Changes

Jump to navigation Jump to search
601 bytes added ,  14:11, 22 January 2018
more log and branch examples
* list the branches that are on remotes <code>git branch -r --list</code>
* checkout a remote branch, setting the local one to track <code>git checkout -t freephile/patch-1</code>
* git branch --merged (while on master) shows you branches which are fully contained in HEAD, and can be deleted.
 
== Comparing Branches ==
What's in this old branch, not in my new branch (ignoring merges)?
* git log oldbranch ^newbranch --no-merges
* git log master..feature (everything on the feature branch that is not in master)
* git log origin/master..HEAD (everything in the local branch that you would push)
* git log --left-right master...experiment (triple dot shows everything since the common ancestor) <ref>https://git-scm.com/book/en/v2/Git-Tools-Revision-Selection#Commit-Ranges</ref>
 
== Don't merge, Rebase! ==
4,558

edits

Navigation menu