Skip to content

Instantly share code, notes, and snippets.

@tamboer
Last active December 15, 2015 01:39
Show Gist options
  • Save tamboer/5181231 to your computer and use it in GitHub Desktop.
Save tamboer/5181231 to your computer and use it in GitHub Desktop.
git stuff
cd /var/www
mkdir scrum
chmod -R 777 scrum/
cd scrum/
git init
git status
git remote add origin git@github.com:buschagne/scrum.git
sudo nano .git/config
git clone git@github.com:buschagne/jplay.git
git add .
git commit -m "---"
git push origin branchName
git fetch
git merge branchName
/* ********************************** */
git branch -m <oldname> <newname>
Suppose you’re done with a remote branch — say, you and your collaborators are finished with a feature and have merged it into your remote’s master branch (or whatever branch your stable codeline is in). You can delete a remote branch using the rather obtuse syntax git push [remotename] :[branch]
git push origin :branchName //del remote branch
As of Git v1.7.0, you can delete a remote branch using
git push origin --delete <branchName>
git pull
/* ********************************** */
If you want to check out a local working branch based on origin/test you need to check it out with
git checkout -b test origin/test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment