-
Notifications
You must be signed in to change notification settings - Fork 0
Git Workflow
Before working on a new feature, make sure your local copy of master is updated to the latest master. Do Team->Remote->Fetch from the origin server, or Team->Fetch From Upstream if you have configured the upstream server already. To update your local master, checkout your local master and Team->Merge from origin/master. Then Team->Switch To->New Branch and create a new branch with a name that includes a text description of your feature, and you can also include the ticket number (not strictly necessary but sometimes helpful).
To update your own local repository to include changes on the origin server, do a Team->Remote->Fetch. This only updates the origin/* branches.
After your ready to update a change with the latest code from the origin server, you can commit it to your local Git repository by right-clicking the top of the Project Explorer tree and selecting Team->Commit. You can then rebase your working branch on origin/master if you are ready to test it.
When you're done testing and you want to push changes to the shared repository, you must commit it to your feature branche and then Team->Push To Upstream (if you have configured Git already).
VERY IMPORTANT: NEVER CROSS-MERGE. I.e., always merge INTO the main shared branch (master in our case), or rebase on master, but never merge FROM a shared branch like master INTO a feature branch. IN BRIEF: MERGE INTO MASTER, REBASE ON MASTER. However --- NEVER rebase a feature branch that someone else might be working off of. If you need to update your feature branch and someone else has been working on your feature branch, do this: make a new branch off of master, then merge your feature branch into the new branch, and start working from there.