Skip to content

Instantly share code, notes, and snippets.

@ar1a
Created June 28, 2016 16:39
Show Gist options
  • Save ar1a/34f7ef64f79e7b5b92395f7b61c3f53f to your computer and use it in GitHub Desktop.
Save ar1a/34f7ef64f79e7b5b92395f7b61c3f53f to your computer and use it in GitHub Desktop.
Git cheatsheet
this is all presumed working with an existing project, when you make a new project with github it gives you the commands
add files that have been changed/added/deleted/anything'd
git add --all
make a commit
git commit -m "short description"
push to server
git push
check if you have added all files or changed anything
git status
create a new branch to work on a feature
git checkout -b name
change branches (master is the main branch)
git checkout name
merge a branch into another (for adding the new feature to the master branch, for example)
git merge name
delete a branch
(local)
git branch -d name
(remote)
git push --delete name
please use both
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment