Changes between Version 10 and Version 11 of notes/git


Ignore:
Timestamp:
2018-12-05T01:36:09Z (6 years ago)
Author:
root
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • notes/git

    v10 v11  
    3030}}}
    3131
     32[[br]]
     33
    3234== pull all branches to local
    3335{{{#!bash
     
    3739}}}
    3840
     41[[br]]
     42
    3943== pull single branch to local
    4044`git checkout -t remotes/origin/<branch_name>`
    4145
     46[[br]]
     47
    4248== drop last `n` commits
    4349`git reset --hard HEAD~n`
     50
     51[[br]]
    4452
    4553== update branch to master and top up unpushed commits
     
    4755* `git merge master` - merge master commits to selected branch
    4856
     57[[br]]
     58
    4959== edit, reword, squash, fixup, drop last `n` commits
    5060`git rebase -i HEAD~n`
    5161
     62[[br]]
     63
    5264== grep commit contents
    5365`git log -p --all -G clean_empty_state`
     66
     67[[br]]
     68
     69== github enterprise behavior
     70- create a merge commit:
     71 - merge all commits from source branch into the middle of target branch;
     72 - create merge commit on top of target branch with all source commits as parents;
     73- squash and merge (prefered):
     74 - squash all source commits into single commit;
     75 - add resulting commit on top of target branch;
     76- rebase ant merge: add all commits from source branch on top of target branch