forked from shackbarth/xtuple
-
Notifications
You must be signed in to change notification settings - Fork 1
Git Usage
John Rogelstad edited this page Jul 1, 2013
·
2 revisions
Fork xtuple repository
git clone [email protected]:{yourrepo}/training.git
git submodule update --init --recursive
Make a change
git status
git diff
git add .
git commit -m 'Your notes here'
git push
Do a pull request.
First time
git remote add XTUPLE [email protected]:xtuple/training.git
git fetch XTUPLE
git checkout --track -b xtuple XTUPLE/master
git checkout master
git merge xtuple
git push
Any other time
git fetch XTUPLE
git checkout xtuple
git pull
git checkout master
git merge xtuple
git push
Create your branch
git checkout -b 12345
Make your change
git add .
git commit -m 'Something new'
git push origin 12345
Do a pull request
First time
git remote add {NAME} [email protected]:{name}/training.git
git fetch {NAME}
git checkout --track -b {other_branch} {NAME}/{other_branch}
git checkout {my_branch}
git merge {other_branch}
git push origin {my_branch}
Any other time
git fetch {NAME}
git checkout {other_branch}
git pull
git checkout {my_branch}
git merge {other_branch}
git push origin {my_branch}
git reset --hard
Save a change
git stash
Put it back
git stash pop
git add .
git add -u