How can I know what was the latest changes made to a branch?

git version 1.7.4.4

I am working on a new project from my development team.

  • Git - pushing to remote repository
  • git doesn't see a file… how to understand what's wrong?
  • Git: after performing a commit, show the date of the last push to each remote
  • How to ensure that Visual Studio Online Git Repository is private?
  • git error: There are still logs under
  • Backup all branches in a git repository keeping what has been rebased and forced
  • So I have just cloned the project. The project has 5 branches.

    I need to know what branch was the latest changes made to. So I can start working on that branch, as that would have the latest changes.

    I have looked at the log. However, but that doesn’t tell me that branches those commits where made to.

    Many thanks for any suggestions,

  • Git missing code after merge
  • Using git commits as tutorial/workshop steps?
  • Rebase a branch without checking it out
  • Unable to push master to heroku
  • Eclipse EGit Command Line
  • git pull and git push in one go
  • 2 Solutions collect form web for “How can I know what was the latest changes made to a branch?”

    A git log --decorate would add tags and branches to each line.

    --decorate[=short|full|no]
    

    Print out the ref names of any commits that are shown.
    If short is specified, the ref name prefixes refs/heads/, refs/tags/ and refs/remotes/ will not be printed.
    If full is specified, the full ref name (including prefix) will be printed.
    The default option is short.

    You can use git for-each-ref to get a list of branches ordered by the date of the last commit on those branches, for instance:

    git fetch origin # Update all your remote tracking branches from origin
    
    git for-each-ref --sort=committerdate refs/remotes/origin/
    

    The branches listed at the end have the most recent commits at their tip. (For a script that produces the relevant dates as well as the branch name you could look here.)

    Git Baby is a git and github fan, let's start git clone.