Changes between Version 13 and Version 14 of GitTips
- Timestamp:
- 06/26/2011 02:43:45 PM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GitTips
v13 v14 101 101 }}} 102 102 103 == Delete the last commit == 104 105 {{{ 106 #!sh 107 git reset --hard HEAD~1 108 }}} 109 103 110 == Delete a remote branch == 104 111 … … 108 115 }}} 109 116 110 == Delete the last commit==117 == Merge a topic branch == 111 118 119 In this example we assume that your topic branch, <topic>, is off master and that you are currently in your topic branch 120 121 1. Squash/reword/edit any commits if need be 112 122 {{{ 113 123 #!sh 114 git re set --hard HEAD~1124 git rebase -i master 115 125 }}} 126 1. Rebase your topic branch on top of current master 127 {{{ 128 #!sh 129 git rebase master 130 }}} 131 1. Change to master 132 {{{ 133 #!sh 134 git checkout master 135 }}} 136 1. ('''Fast-forward''') merge your topic branch into master 137 {{{ 138 #!sh 139 git merge <topic> 140 }}} 141 1. Delete your local topic branch (see above tip for remote deletion) 142 {{{ 143 #!sh 144 git branch -d <topic> 145 }}}