Using Git

From Bridges Lab Protocols
Revision as of 16:45, 26 April 2010 by Davebridges (Talk | contribs) (wrote initial page)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

See

==Command Line

Normal Working Routine

  • go to repository, check current branch. git branch. To change to a different branch git checkout branchname
  • update to current version. git pull
  • make changes as required. You should commit these changes early and often * git commit -am Some note about the changes
  • once you are done (or at any time really) push the changes back to the remote repository (git push).

Creating New Branches

  • if a new branch is required create it. git branch newbranchname
  • switch to newly created branch git checkout newbranchname
  • commits will now be unique to this branch
  • to merge changes in from another branch, go to the pulling branch and enter git merge otherbranch. Make sure to commit and push these changes.