Skip to content

Instantly share code, notes, and snippets.

@albankora
Created September 16, 2015 12:00
Show Gist options
  • Save albankora/8d80e8e73eabad0ef1ba to your computer and use it in GitHub Desktop.
Save albankora/8d80e8e73eabad0ef1ba to your computer and use it in GitHub Desktop.
Git Usage and configs
### Config ###
git config --global core.autocrlf input
### Create remote branch ###
git push origin <branchName>
### Delete remote branch ###
git push origin --delete <branchName>
###Start developing new feature###
git checkout -b <branchName> develop
git commit -a -m "NEW: new awesome feature added"
###Marge new feature to developing branch###
git checkout develop
git merge --no-ff <branchName>
git branch -d <branchName>
git push origin develop
###Creating and Finishing the hotfix branch###
git checkout -b hotfix-1.2.1 master
git commit -a -m "FIX: version number fixed"
git checkout master
git merge --no-ff hotfix-1.2.1
git tag -a 1.2.1
git checkout develop
git merge --no-ff hotfix-1.2.1
git branch -d hotfix-1.2.1
###Creating and Finishing a release branch###
git checkout -b release-1.2 develop
git checkout master
git merge --no-ff release-1.2
git tag -a 1.2
git checkout develop
git merge --no-ff release-1.2
git branch -d release-1.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment