Branch
https://www.lukeko.com/35/branch 0list branches
git branch
create (and checkout) new branch
git checkout -b crazy-experiment
delete branch (after merging)
git branch -d crazy-experiment
delete branch (not merged but you don't want the branch anymore)
git branch -D crazy-experiment
The above command will not delete the branch in the remote repo. To delete the branch in the remote repo as well do the following
delete remote branch
git push origin --delete crazy-experiment
#or
git push origin :crazy-experiment
https://www.atlassian.com/git/tutorials/using-branches
rename local branch
#checkout branch you want to rename
git checkout crazy-experiment
#rename it
git branch -m failed-experiment
diff file on another branch
#see what changed with user.rb on another commit or branch
git diff aa6d804 -- app/models/user.rb