Wiki
Clone wikiscl-manips-group / help / Git instructions and notes
Misc instructions (4/8/13):
Get to michelle_fmri_haptics branch:
git branch git branch -a (lists branch) git checkout --track -b fmri_haptics origin/fmri_haptics git checkout -b michelle_fmri_haptics (I think -b makes the branch)
once in michelle_fmri_haptics branch:
cd applications-linux cd fmri_xyz_localizer/ sh make_rel.sh
Updating code from remote master
# Make sure you commit all your changes # Else the reset will erase them anyway git reset HEAD --hard git checkout fmri_haptics git pull git checkout michelle_fmri_haptics git rebase fmri_haptics
Pushing code properly (6/4/2013)
Add, commit, etc.
git add . git commit -a **(commits all) git diff **(see if anything is left to commit) git push origin michelle_fmri_haptics
Problems pushing (7/23/2013):
$ git push Password: To https://mxyu@bitbucket.org/samirmenon/scl-manips-group.git ! [rejected] master -> master (non-fast-forward) error: failed to push some refs to 'https://mxyu@bitbucket.org/samirmenon/scl-manips-group.git' To prevent you from losing history, non-fast-forward updates were rejected Merge the remote changes before pushing again. See the 'Note about fast-forwards' section of 'git push --help' for details.
Solution:
- First try doing:
$ git push origin <branch name>
and then if that doesn't work, do the following:
- Make sure all of your changes are committed
- Delete the remote branch of your current branch:
git push origin :<yourbranch>
- Push again
git push origin <yourbranch>
- Apparently this problem is caused by the branch going stale after rebasing.
Manipulating branches (deleting, pushing to remote)
http://gitready.com/beginner/2009/02/02/push-and-delete-branches.html
And be careful about using the colon: http://stackoverflow.com/questions/7303687/why-git-use-the-colon-branch-to-delete-remote-branch
Other commands to use
gitk or gitg git stash
Updated