Changes between Version 6 and Version 7 of GitUsage
- Timestamp:
- 07/12/11 17:47:03 (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GitUsage
v6 v7 44 44 45 45 That 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 49 Don't be afraid to create and delete lots of branches. They're totally expendable, and a new branch is a fresh start. 50 51 Always 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.