Changes between Version 6 and Version 7 of GitUsage


Ignore:
Timestamp:
07/12/11 17:47:03 (7 years ago)
Author:
magnate
Comment:

Added tips about rebasing

Legend:

Unmodified
Added
Removed
Modified
  • GitUsage

    v6 v7  
    4444 
    4545That creates a new copy of the branch you're tracking, adds your commit without recursing, and pushes it upstream as if you'd done it right in the first place. All that's left is to tidy up your local repo: delete the old messed-up branch ('git branch -D branchname') and rename the new one to match the one you're tracking ('git branch -m newbranch branchname'). 
     46 
     47== Other general tips == 
     48 
     49Don't be afraid to create and delete lots of branches. They're totally expendable, and a new branch is a fresh start. 
     50 
     51Always update your local copy of the official repository (git fetch official) before pushing your work. If possible, use "git rebase official/staging" to ensure that your changes are on top of the very latest commits from the staging branch - that will make them easier to merge. If you are nervous about trying this on a branch with lots of your hard work in it, create a new copy of that branch first - so if the rebase goes horribly wrong, your original branch is untouched.