Skip to content

Instantly share code, notes, and snippets.

@gsdevme
Created April 11, 2012 16:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gsdevme/2360402 to your computer and use it in GitHub Desktop.
Save gsdevme/2360402 to your computer and use it in GitHub Desktop.
Git help... hopefully
# create a local repo
git init
# create a remote repo
git --base init
# add a file to tracking
git add lemon.css
# add all files to tracking
git add .
# add a remote server origin to your local repo
git remote add origin SSH_USER@IP:REPO.git
# remove a remote server
git remote rm origin
# commit a file
git commit lemon.css
# commit all files
git commit -a
# push to remote server (master == branch)
git push origin master
# create a new branch
git branch orange
# delete a branch
git branch -d orange
# switch to a branch
git checkout orange
git checkout master
# see all branches
git branch -a
@Jontyy
Copy link

Jontyy commented Apr 11, 2012

git branch orange - I usually do git checkout orange is there much difference that you know of?

@gsdevme
Copy link
Author

gsdevme commented Apr 11, 2012 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment