User Tools

Site Tools


newdevs:git:commands

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Last revision Both sides next revision
newdevs:git:commands [2021/06/10 12:05]
tmccanna [Squash Commits]
newdevs:git:commands [2021/06/10 12:06]
tmccanna [Squash Commits]
Line 71: Line 71:
  
   - Verify that you are in your local branch.   - Verify that you are in your local branch.
-  - Type: git rebase -i origin/​master +  - Type: ''​git rebase -i origin/​master''​ 
-    * Alternatively if your branch is already built on current master, you can enter: git rebase -i HEAD~4 ​  ​(where 4 is the number of commits you wish to combine) ​   ​+    * Alternatively if your branch is already built on current master, you can use''​git rebase -i HEAD~4'' ​  (where 4 is the number of commits you wish to combine) ​   ​
   - Your text editor will open and should show both of the commits, for example:   - Your text editor will open and should show both of the commits, for example:
     * pick 014e59c579 LP#1839359 Select element on login not accessible     * pick 014e59c579 LP#1839359 Select element on login not accessible
Line 80: Line 80:
     * fixup --> merges commits like squash does, but discards previous commit message     * fixup --> merges commits like squash does, but discards previous commit message
   - Push the commit again, and force it to overwrite the previous commits:   - Push the commit again, and force it to overwrite the previous commits:
-    * git push --force working lp1839359_login_select:​user/​jdoe/​lp1839359_login_select+    * ''​git push --force working lp1839359_login_select:​user/​jdoe/​lp1839359_login_select''​
  
  
newdevs/git/commands.txt · Last modified: 2021/06/10 12:07 by tmccanna

© 2008-2017 GPLS and others. Evergreen is open source software, freely licensed under GNU GPLv2 or later.
The Evergreen Project is a member of Software Freedom Conservancy.