Skip to content

Instantly share code, notes, and snippets.

@cfarm
Last active August 29, 2015 14:03
Show Gist options
  • Select an option

  • Save cfarm/80c953351da16604792c to your computer and use it in GitHub Desktop.

Select an option

Save cfarm/80c953351da16604792c to your computer and use it in GitHub Desktop.

Revisions

  1. cfarm revised this gist Jul 15, 2015. 1 changed file with 10 additions and 0 deletions.
    10 changes: 10 additions & 0 deletions github-flow.md
    Original file line number Diff line number Diff line change
    @@ -32,6 +32,16 @@

    1. `git checkout production`
    2. `git merge master`
    3.

    ## TL;DR

    1. `git checkout master`
    1. `git branch my-new-branch`
    1. `git checkout my-new-branch`
    1. `git add filename`
    1. `git commit -m "i edited a file"`
    1. `git push origin my-new-branch`

    ## BONUS: TAGS
    You can create tags in Git and push them to Github to make specific 'releases' for a delivery. This freezes the codebase at that point in time at a url using that tagname.
  2. cfarm revised this gist Jul 11, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion github-flow.md
    Original file line number Diff line number Diff line change
    @@ -36,7 +36,7 @@
    ## BONUS: TAGS
    You can create tags in Git and push them to Github to make specific 'releases' for a delivery. This freezes the codebase at that point in time at a url using that tagname.

    1. Create a tag
    1. Create a tag called batch1-templates

    `git tag batch1-templates`

  3. cfarm revised this gist Jul 11, 2014. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions github-flow.md
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    ## Workflow for Git and Github

    1. Create a new branch from master:

    1. `git checkout master` or `git status` to confirm you're working on master
  4. cfarm revised this gist Jul 11, 2014. 1 changed file with 14 additions and 1 deletion.
    15 changes: 14 additions & 1 deletion github-flow.md
    Original file line number Diff line number Diff line change
    @@ -29,4 +29,17 @@
    7. Once your Pull Request is approved and merged to master, you'll need to take an additional step to deploy it to the Client site by merging it to the `production` branch.

    1. `git checkout production`
    2. `git merge master`
    2. `git merge master`

    ## BONUS: TAGS
    You can create tags in Git and push them to Github to make specific 'releases' for a delivery. This freezes the codebase at that point in time at a url using that tagname.

    1. Create a tag

    `git tag batch1-templates`

    2. Push to Github!

    `git push --tags`

    3. Check the Github 'Releases' tab for your repo to see all tags.
  5. cfarm revised this gist Jul 11, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion github-flow.md
    Original file line number Diff line number Diff line change
    @@ -17,7 +17,7 @@

    This will create the branch on Github.

    5. When you're ready for the branch to be reviewed, it's PULL REQUEST TIME. Go to the repository and click the BIG GREEN BUTTON
    5. When you're ready for the branch to be reviewed, it's PULL REQUEST TIME. Go to the repository and click the BIG GREEN BUTTON. You can see the site build by clicking the Deployment "Details" link on the bottom of the PR page.

    6. IF you can't merge through Github then you need to do it manually. Commands:

  6. cfarm revised this gist Jul 11, 2014. 1 changed file with 2 additions and 4 deletions.
    6 changes: 2 additions & 4 deletions github-flow.md
    Original file line number Diff line number Diff line change
    @@ -1,10 +1,8 @@
    1. Create a new branch from master:

    `git checkout master`
    1. `git checkout master` or `git status` to confirm you're working on master
    2. `git branch my-new-branch`

    or git status to confirm you're on master

    `git branch my-new-branch`
    2. Check out the new branch!!!

    `git checkout my-new-branch`
  7. cfarm revised this gist Jul 11, 2014. 1 changed file with 10 additions and 4 deletions.
    14 changes: 10 additions & 4 deletions github-flow.md
    Original file line number Diff line number Diff line change
    @@ -1,17 +1,23 @@
    1. Create a new branch from Master
    1. Create a new branch from master:

    `git checkout master`

    or git status to confirm you're on master

    `git branch my-new-branch`
    2. Check out the new branch!!!

    `git checkout my-new-branch`

    3. Make commits on this branch
    1. `git add filename`
    2. `git commit -m "i edited a file"`

    4. Push commits to remote repository (Github)
    `git push origin my-new-branch`
    This will create the branch on Github.
    4. Push commits to remote repository (Github):

    `git push origin my-new-branch`

    This will create the branch on Github.

    5. When you're ready for the branch to be reviewed, it's PULL REQUEST TIME. Go to the repository and click the BIG GREEN BUTTON

  8. cfarm revised this gist Jul 11, 2014. 1 changed file with 10 additions and 10 deletions.
    20 changes: 10 additions & 10 deletions github-flow.md
    Original file line number Diff line number Diff line change
    @@ -1,26 +1,26 @@
    1. Create a new branch from Master
    `git checkout master`
    `git checkout master`
    or git status to confirm you're on master
    `git branch my-new-branch`
    `git branch my-new-branch`
    2. Check out the new branch!!!
    `git checkout my-new-branch`
    `git checkout my-new-branch`

    3. Make commits on this branch
    `git add filename`
    `git commit -m "i edited a file"`
    1. `git add filename`
    2. `git commit -m "i edited a file"`

    4. Push commits to remote repository (Github)
    `git push origin my-new-branch`
    This will create the branch on Github.

    5. When you're ready for the branch to be reviewed, it's PULL REQUEST TIME. Github.com Yo.
    5. When you're ready for the branch to be reviewed, it's PULL REQUEST TIME. Go to the repository and click the BIG GREEN BUTTON

    6. IF you can't merge through Github then you need to do it manually. Commands:

    * `git checkout master`
    * Then make sure you're up to date with `git pull`
    * `git merge my-new-branch`
    * `git push origin master`
    1. `git checkout master`
    2. Then make sure you're up to date with `git pull`
    3. `git merge my-new-branch`
    4. `git push origin master`

    7. Once your Pull Request is approved and merged to master, you'll need to take an additional step to deploy it to the Client site by merging it to the `production` branch.

  9. cfarm revised this gist Jul 11, 2014. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions github-flow.md
    Original file line number Diff line number Diff line change
    @@ -24,5 +24,5 @@ This will create the branch on Github.

    7. Once your Pull Request is approved and merged to master, you'll need to take an additional step to deploy it to the Client site by merging it to the `production` branch.

    `git checkout production`
    `git merge master`
    1. `git checkout production`
    2. `git merge master`
  10. cfarm renamed this gist Jul 11, 2014. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  11. cfarm created this gist Jul 11, 2014.
    28 changes: 28 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,28 @@
    1. Create a new branch from Master
    `git checkout master`
    or git status to confirm you're on master
    `git branch my-new-branch`
    2. Check out the new branch!!!
    `git checkout my-new-branch`

    3. Make commits on this branch
    `git add filename`
    `git commit -m "i edited a file"`

    4. Push commits to remote repository (Github)
    `git push origin my-new-branch`
    This will create the branch on Github.

    5. When you're ready for the branch to be reviewed, it's PULL REQUEST TIME. Github.com Yo.

    6. IF you can't merge through Github then you need to do it manually. Commands:

    * `git checkout master`
    * Then make sure you're up to date with `git pull`
    * `git merge my-new-branch`
    * `git push origin master`

    7. Once your Pull Request is approved and merged to master, you'll need to take an additional step to deploy it to the Client site by merging it to the `production` branch.

    `git checkout production`
    `git merge master`