Skip to content

Instantly share code, notes, and snippets.

@burakaydn
Last active December 16, 2015 14:09
Show Gist options
  • Save burakaydn/5446784 to your computer and use it in GitHub Desktop.
Save burakaydn/5446784 to your computer and use it in GitHub Desktop.
  • Create new repository

git init

  • Add changes to Index

git add .

  • Commit changes

git commit -m "Why?"

  • Repository status

git status

  • Clone repository

git clone repository_path

  • List branches

git branch

  • Switch between branches

git checkout branch_name

  • Update local repository from remote

git pull

  • Push changes to remote repository

git push remote_repo local_branch

  • Add remote repository

git remote add remote_repo_name remote_repo_path

  • Remove untracked files

git clean -f

  • Remove ignored files

git clean -f -X

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