Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save thadeusdev/63da55e4799e6d03df2ce40f0a0e444d to your computer and use it in GitHub Desktop.

Select an option

Save thadeusdev/63da55e4799e6d03df2ce40f0a0e444d to your computer and use it in GitHub Desktop.

Revisions

  1. @adamloving adamloving revised this gist Oct 7, 2013. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions git-collaborative-workflow.md
    Original file line number Diff line number Diff line change
    @@ -29,8 +29,9 @@ Creating the change
    If you want to use git workflow to do code reviews (and are using github), at this point you can create a pull request. Using a pull request, you assign your buddy the task of approving merging your changes (from your feature branch back into master or a release branch). To create the pull request, go to your project on github.com, click "pull requests," then create.


    Other guy merges in the changes (assuming no pull request)
    ==========================================================
    Other guy merges in the changes
    ===============================
    (assuming no pull request)

    $ git fetch

  2. @adamloving adamloving revised this gist Oct 2, 2013. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions git-collaborative-workflow.md
    Original file line number Diff line number Diff line change
    @@ -52,6 +52,8 @@ Other guy merges in the changes (assuming no pull request)

    $ git branch -d my-feature
    $ git push origin :my-feature

    If you used the github pull request workflow, at this point, the reviewer should delete the feature branch.

    Other useful commands
    =====================
  3. @adamloving adamloving revised this gist Oct 2, 2013. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions git-collaborative-workflow.md
    Original file line number Diff line number Diff line change
    @@ -12,9 +12,9 @@ Creating the change

    $ git commit -a -m "my feature is this"

    ... then pull in changes from master since we branched, and re-apply ours on top...
    ... then fetch changes from master since we branched, and re-apply ours on top...

    $ git pull
    $ git fetch
    $ git rebase master

    ... Also fine to merge here instead of rebase (but rebasing is better because makes it easier for others!). Resolve conflicts (if any) and add them ...
    @@ -32,7 +32,7 @@ If you want to use git workflow to do code reviews (and are using github), at th
    Other guy merges in the changes (assuming no pull request)
    ==========================================================

    $ git pull
    $ git fetch

    ... list branches

  4. @adamloving adamloving revised this gist Oct 2, 2013. 1 changed file with 5 additions and 2 deletions.
    7 changes: 5 additions & 2 deletions git-collaborative-workflow.md
    Original file line number Diff line number Diff line change
    @@ -26,8 +26,11 @@ Creating the change

    $ git push origin my-feature

    Other guy merges in the changes
    ===============================
    If you want to use git workflow to do code reviews (and are using github), at this point you can create a pull request. Using a pull request, you assign your buddy the task of approving merging your changes (from your feature branch back into master or a release branch). To create the pull request, go to your project on github.com, click "pull requests," then create.


    Other guy merges in the changes (assuming no pull request)
    ==========================================================

    $ git pull

  5. @adamloving adamloving revised this gist Aug 16, 2013. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions git-collaborative-workflow.md
    Original file line number Diff line number Diff line change
    @@ -15,9 +15,9 @@ Creating the change
    ... then pull in changes from master since we branched, and re-apply ours on top...

    $ git pull
    $ git rebase master

    ... resolve conflicts (if any) and add them ...
    $ git rebase master
    ... Also fine to merge here instead of rebase (but rebasing is better because makes it easier for others!). Resolve conflicts (if any) and add them ...

    $ git add <filename>
    $ git rebase --continue
  6. @adamloving adamloving revised this gist Aug 16, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion git-collaborative-workflow.md
    Original file line number Diff line number Diff line change
    @@ -12,7 +12,7 @@ Creating the change

    $ git commit -a -m "my feature is this"

    ... then pull in changes from master since we branched, and re-apply ours on top. Also fine to merge here instead of rebase (but rebasing is better because makes it easier for others!) ...
    ... then pull in changes from master since we branched, and re-apply ours on top...

    $ git pull
    $ git rebase master
  7. @adamloving adamloving revised this gist Aug 16, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion git-collaborative-workflow.md
    Original file line number Diff line number Diff line change
    @@ -12,7 +12,7 @@ Creating the change

    $ git commit -a -m "my feature is this"

    ... pulls in changes from master since we branched, then re-apply ours on top. Totally fine to merge here instead of rebase ...
    ... then pull in changes from master since we branched, and re-apply ours on top. Also fine to merge here instead of rebase (but rebasing is better because makes it easier for others!) ...

    $ git pull
    $ git rebase master
  8. @adamloving adamloving revised this gist Aug 7, 2013. No changes.
  9. @adamloving adamloving revised this gist Jun 1, 2013. 1 changed file with 28 additions and 24 deletions.
    52 changes: 28 additions & 24 deletions git-collaborative-workflow.md
    Original file line number Diff line number Diff line change
    @@ -1,54 +1,58 @@
    Creating the change
    $ git checkout -b my-feature
    ===================

    $ git checkout -b my-feature

    ... modify code ....

    $ git add <filename>
    $ git commit -m “my feature is this”
    $ git add <filename>
    $ git commit -m “my feature is this”

    ... or, if you're lazy ...

    $ git commit -a -m "my feature is this"

    ... pulls in changes from master since we branched, then re-apply ours on top. Totally fine to merge here instead of rebase ...

    $ git pull
    $ git rebase master
    $ git pull
    $ git rebase master

    ... resolve conflicts (if any) and add them ...

    $ git add <filename>
    $ git rebase --continue
    $ git add <filename>
    $ git rebase --continue

    ... # push my branch back to the server

    $ git push origin my-feature
    $ git push origin my-feature

    Other guy merges in the changes
    ===============================

    $ git pull
    $ git pull

    ... list branches

    $ git branch -a
    $ git branch -a

    ... bring a branch local

    $ git branch --track my-feature origin/my-feature
    $ git checkout master
    $ git merge my-feature
    $ git push
    $ git branch --track my-feature origin/my-feature
    $ git checkout master
    $ git merge my-feature

    ... resolve conflicts and look around ...

    ... delete branch (and remote branch) when done
    $ git push

    $ git branch -d my-feature
    $ git push origin :my-feature
    ... delete branch (and remote branch) when done

    $ git branch -d my-feature
    $ git push origin :my-feature

    Other useful commands
    To remove remote branches from your list after they have been deleted by other people

    $ git remote prune origin




    =====================

    To remove remote branches from your list after they have been deleted by other people

    $ git remote prune origin
  10. @adamloving adamloving created this gist Jun 1, 2013.
    54 changes: 54 additions & 0 deletions git-collaborative-workflow.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,54 @@
    Creating the change
    $ git checkout -b my-feature

    ... modify code ....

    $ git add <filename>
    $ git commit -m “my feature is this”

    ... pulls in changes from master since we branched, then re-apply ours on top. Totally fine to merge here instead of rebase ...

    $ git pull
    $ git rebase master

    ... resolve conflicts (if any) and add them ...

    $ git add <filename>
    $ git rebase --continue

    ... # push my branch back to the server

    $ git push origin my-feature
    Other guy merges in the changes

    $ git pull

    ... list branches

    $ git branch -a

    ... bring a branch local

    $ git branch --track my-feature origin/my-feature
    $ git checkout master
    $ git merge my-feature
    $ git push

    ... resolve conflicts and look around ...

    ... delete branch (and remote branch) when done

    $ git branch -d my-feature
    $ git push origin :my-feature


    Other useful commands
    To remove remote branches from your list after they have been deleted by other people

    $ git remote prune origin