Created
November 1, 2014 19:04
-
-
Save filipkral/f9b8532c3f4e7f87b184 to your computer and use it in GitHub Desktop.
Revisions
-
filipkral created this gist
Nov 1, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,31 @@ # https://confluence.atlassian.com/display/STASH/Basic+Git+commands # simplest example git clone https://github.com/some/repo repo cd repo # make changes to files git commit -a -m "Commit message" # you can check status by `git status` git push origin master # to work on a branch git clone https://github.com/some/repo repo cd repo # list all branches with `git branch` # crate a new branch (leave out -b to switch branches): git checkout -b mybranch # make changes to files, add them to git control, and commit: git add folder/file.py git commit -a -m "Commit message" # push branch to remote repo, or all branches git push --all origin git push origin mybranch # once the admin merges the branch you can delete it if they didn't git push origin :mybranch # you can then delete your local branch after you switch to another one git branch -d mybranch # and pull changes from remote repo git pull # hopefully there won't be any merge conflicts