Changes between Version 8 and Version 9 of notes/git


Ignore:
Timestamp:
2018-01-08T15:00:27Z (7 years ago)
Author:
root
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • notes/git

    v8 v9  
    3939== pull single branch to local
    4040`git checkout -t remotes/origin/<branch_name>`
     41
     42== drop last `n` commits
     43`git reset --hard HEAD~n`
     44
     45== update branch to master and top up unpushed commits
     46* `git pull --rebase origin master` - in not pushed branch with local only commits. if something already pushed to remote it will desynchronize local and remote sides. in this case use:
     47* `git merge master` - merge master commits to selected branch
     48
     49== edit, reword, squash, fixup, drop last `n` commits
     50`git rebase -i HEAD~n`