-
-
Save eimajtrebor/ce7ad6dd910030b5d7eb957ed96cf74e to your computer and use it in GitHub Desktop.
Revisions
-
JamesMGreene revised this gist
Nov 30, 2017 . 1 changed file with 25 additions and 25 deletions.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 @@ -3,8 +3,8 @@ gitflow | git --------|----- `git flow init` | `git init` | `git commit --allow-empty -m "Initial commit"` | `git checkout -b develop master` ## Connect to the remote repository @@ -28,32 +28,32 @@ gitflow | git gitflow | git --------|----- `git flow feature publish MYFEATURE` | `git checkout feature/MYFEATURE` | `git push origin feature/MYFEATURE` ### Get latest for a feature branch gitflow | git --------|----- `git flow feature pull origin MYFEATURE` | `git checkout feature/MYFEATURE` | `git pull --rebase origin feature/MYFEATURE` ### Finalize a feature branch gitflow | git --------|----- `git flow feature finish MYFEATURE` | `git checkout develop` | `git merge --no-ff feature/MYFEATURE` | `git branch -d feature/MYFEATURE` ### Push the merged feature branch gitflow | git --------|----- _N/A_ | `git push origin develop` | `git push origin :feature/MYFEATURE` _(if pushed)_ ## Releases @@ -70,37 +70,37 @@ gitflow | git gitflow | git --------|----- `git flow release publish 1.2.0` | `git checkout release/1.2.0` | `git push origin release/1.2.0` ### Get latest for a release branch gitflow | git --------|----- _N/A_ | `git checkout release/1.2.0` | `git pull --rebase origin release/1.2.0` ### Finalize a release branch gitflow | git --------|----- `git flow release finish 1.2.0` | `git checkout master` | `git merge --no-ff release/1.2.0` | `git tag -a 1.2.0` | `git checkout develop` | `git merge --no-ff release/1.2.0` | `git branch -d release/1.2.0` ### Push the merged feature branch gitflow | git --------|----- _N/A_ | `git push origin master` | `git push origin develop` | `git push origin --tags` | `git push origin :release/1.2.0` _(if pushed)_ ## Hotfixes @@ -117,21 +117,21 @@ gitflow | git gitflow | git --------|----- `git flow hotfix finish 1.2.1` | `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` ### Push the merged hotfix branch gitflow | git --------|----- _N/A_ | `git push origin master` | `git push origin develop` | `git push origin --tags` | `git push origin :hotfix/1.2.1` _(if pushed)_ -
JamesMGreene revised this gist
Jul 1, 2014 . 1 changed file with 7 additions and 0 deletions.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 @@ -133,3 +133,10 @@ _N/A_ | `git push origin master` | `git push origin --tags` | `git push origin :hotfix/1.2.1` _(if pushed)_ ## References - http://nvie.com/posts/a-successful-git-branching-model/ - https://help.github.com/articles/using-pull-requests#shared-repository-model - Personal experience -
JamesMGreene revised this gist
Jun 12, 2014 . 1 changed file with 1 addition and 1 deletion.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 @@ -81,7 +81,7 @@ _N/A_ | `git checkout release/1.2.0` | `git pull --rebase origin release/1.2.0` ### Finalize a release branch gitflow | git --------|----- -
JamesMGreene revised this gist
Jun 12, 2014 . 1 changed file with 3 additions and 3 deletions.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 @@ -48,7 +48,7 @@ gitflow | git | `git branch -d feature/MYFEATURE` ### Push the merged feature branch gitflow | git --------|----- @@ -93,7 +93,7 @@ gitflow | git | `git branch -d release/1.2.0` ### Push the merged feature branch gitflow | git --------|----- @@ -124,7 +124,7 @@ gitflow | git | `git branch -d hotfix/1.2.1` ### Push the merged hotfix branch gitflow | git --------|----- -
JamesMGreene revised this gist
Jun 12, 2014 . 1 changed file with 3 additions and 3 deletions.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 @@ -53,7 +53,7 @@ gitflow | git gitflow | git --------|----- _N/A_ | `git push origin develop` | `git push origin :feature/MYFEATURE` _(if pushed)_ ## Releases @@ -100,7 +100,7 @@ gitflow | git _N/A_ | `git push origin master` | `git push origin develop` | `git push origin --tags` | `git push origin :release/1.2.0` _(if pushed)_ ## Hotfixes @@ -131,5 +131,5 @@ gitflow | git _N/A_ | `git push origin master` | `git push origin develop` | `git push origin --tags` | `git push origin :hotfix/1.2.1` _(if pushed)_ -
JamesMGreene revised this gist
Jun 12, 2014 . 1 changed file with 26 additions and 15 deletions.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 @@ -53,7 +53,7 @@ gitflow | git gitflow | git --------|----- _N/A_ | `git push origin develop` | `git push origin :feature/MYFEATURE # If pushed` ## Releases @@ -100,25 +100,36 @@ gitflow | git _N/A_ | `git push origin master` | `git push origin develop` | `git push origin --tags` | `git push origin :release/1.2.0 # If pushed` ## Hotfixes ### Create a hotfix branch gitflow | git --------|----- `git flow hotfix start 1.2.1 [commit]` | `git checkout -b hotfix/1.2.1 [commit]` ### Finalize a hotfix branch gitflow | git --------|----- `git flow hotfix finish 1.2.1` | `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` ### Push a hotfix branch gitflow | git --------|----- _N/A_ | `git push origin master` | `git push origin develop` | `git push origin --tags` | `git push origin :hotfix/1.2.1 # If pushed` -
JamesMGreene revised this gist
Jun 12, 2014 . 1 changed file with 1 addition and 1 deletion.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 @@ -11,7 +11,7 @@ gitflow | git gitflow | git --------|----- _N/A_ | `git remote add origin [email protected]:MYACCOUNT/MYREPO` ## Features -
JamesMGreene revised this gist
Jun 12, 2014 . 1 changed file with 63 additions and 49 deletions.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 @@ -1,92 +1,106 @@ ## Initialize gitflow | git --------|----- `git flow init` | `git init` | `git commit --allow-empty -m "Initial commit"` | `git checkout -b develop master` ## Connect to the remote repository gitflow | git --------|----- `git remote add origin [email protected]:MYACCOUNT/MYREPO` | _same_ ## Features ### Create a feature branch gitflow | git --------|----- `git flow feature start MYFEATURE` | `git checkout -b feature/MYFEATURE develop` ### Share a feature branch gitflow | git --------|----- `git flow feature publish MYFEATURE` | `git checkout feature/MYFEATURE` | `git push origin feature/MYFEATURE` ### Get latest for a feature branch gitflow | git --------|----- `git flow feature pull origin MYFEATURE` | `git checkout feature/MYFEATURE` | `git pull --rebase origin feature/MYFEATURE` ### Finalize a feature branch gitflow | git --------|----- `git flow feature finish MYFEATURE` | `git checkout develop` | `git merge --no-ff feature/MYFEATURE` | `git branch -d feature/MYFEATURE` ### Push the finalized feature branch gitflow | git --------|----- _N/A_ | `git push origin develop` | `git push origin :feature/MYFEATURE` ## Releases ### Create a release branch gitflow | git --------|----- `git flow release start 1.2.0` | `git checkout -b release/1.2.0 develop` ### Share a release branch gitflow | git --------|----- `git flow release publish 1.2.0` | `git checkout release/1.2.0` | `git push origin release/1.2.0` ### Get latest for a release branch gitflow | git --------|----- _N/A_ | `git checkout release/1.2.0` | `git pull --rebase origin release/1.2.0` # Finalize a release branch gitflow | git --------|----- `git flow release finish 1.2.0` | `git checkout master` | `git merge --no-ff release/1.2.0` | `git tag -a 1.2.0` | `git checkout develop` | `git merge --no-ff release/1.2.0` | `git branch -d release/1.2.0` ### Push the finalized feature branch gitflow | git --------|----- _N/A_ | `git push origin master` | `git push origin develop` | `git push origin --tags` | `git push origin :release/1.2.0` ```sh @@ -107,4 +121,4 @@ git checkout master git merge --no-ff hotfix-1.2.1 git branch -d hotfix-1.2.1 git tag -a 1.2.1 ``` -
JamesMGreene revised this gist
Jun 12, 2014 . 1 changed file with 3 additions and 23 deletions.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 @@ -6,32 +6,12 @@ gitflow | git | `git commit --allow-empty -m "Initial commit"` | `git checkout -b develop` ### Connect to the remote repository gitflow | git --------|----- `git remote add origin [email protected]:MYACCOUNT/MYREPO` | `git remote add origin [email protected]:MYACCOUNT/MYREPO` ### Create a feature branch -
JamesMGreene revised this gist
Jun 12, 2014 . 1 changed file with 1 addition and 1 deletion.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 @@ -4,7 +4,7 @@ gitflow | git --------|---- `git flow init` | `git init` | `git commit --allow-empty -m "Initial commit"` | `git checkout -b develop` With `gitflow`: ```sh -
JamesMGreene revised this gist
Jun 12, 2014 . 1 changed file with 3 additions and 5 deletions.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 @@ -2,11 +2,9 @@ gitflow | git --------|---- `git flow init` | `git init` | `git commit --allow-empty -m "Initial commit"` | git checkout -b develop With `gitflow`: ```sh -
JamesMGreene revised this gist
Jun 12, 2014 . 1 changed file with 3 additions and 6 deletions.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 @@ -1,7 +1,4 @@ ### Initialize gitflow | git --------|---- @@ -30,7 +27,7 @@ git checkout -b develop ``` ### Connect to the remote repository With `gitflow` and/or raw `git`: ```sh @@ -39,7 +36,7 @@ git remote add origin [email protected]:MYACCOUNT/MYREPO ``` ### Create a feature branch ```sh -
JamesMGreene created this gist
Jun 12, 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,135 @@ # gitflow.md # Initialize gitflow | git --------|---- ```sh git flow init ``` | ```sh git init ``` With `gitflow`: ```sh git flow init ``` With raw `git`: ``` # Make this directory into a git repo git init # Now in `master` branch # Make an initial commit for the sake of commit tracking (history, branching, etc.) git commit --allow-empty -m "Initial commit" # Create a `develop` branch from `master` and then check it out git checkout -b develop ``` # Connect to the remote repository With `gitflow` and/or raw `git`: ```sh # Add the remote repo URL git remote add origin [email protected]:MYACCOUNT/MYREPO ``` # Create a feature branch ```sh git flow feature start MYFEATURE ``` git checkout -b MYFEATURE develop # Create a `MYFEATURE` branch from `develop` and the check it out ``` ```sh git flow feature publish MYFEATURE git push origin MYFEATURE ``` ```sh git flow feature pull origin MYFEATURE git pull origin MYFEATURE # ???? ``` ```sh git flow feature finish MYFEATURE git checkout develop # Checkout the `develop` branch git merge --no-ff MYFEATURE # Merge the `MYFEATURE` branch into `develop`. `--no-ff` creates a merge commit. git branch -d MYFEATURE # Delete the `MYFEATURE` branch git push origin develop # Push the `develop` branch to remote ``` ```sh git flow release start 1.2.0 git checkout -b release-1.2.0 develop # (Run some commands to update the version) git commit -a -m "Bumped version number to 1.2.0" ``` ```sh git flow release publish 1.2.0 git push origin release-1.2.0 ``` ```sh git flow release finish 1.2.0 git checkout master git merge --no-ff release-1.2.0 git branch -d release-1.2.0 git tag -a 1.2.0 ``` ```sh git push --tags git push origin master --tags ``` ```sh git flow hotfix start 1.2.1 [master|develop] git checkout -b hotfix-1.2.1 [master|develop] ``` ```sh git flow hotfix finish 1.2.1 git checkout develop git merge --no-ff hotfix-1.2.1 git checkout master git merge --no-ff hotfix-1.2.1 git branch -d hotfix-1.2.1 git tag -a 1.2.1 ```