Skip to content

Instantly share code, notes, and snippets.

@zrosenbauer
Last active August 29, 2015 14:01
Show Gist options
  • Save zrosenbauer/b98d4406e360953f415d to your computer and use it in GitHub Desktop.
Save zrosenbauer/b98d4406e360953f415d to your computer and use it in GitHub Desktop.

Revisions

  1. zrosenbauer revised this gist May 17, 2014. 1 changed file with 26 additions and 16 deletions.
    42 changes: 26 additions & 16 deletions gitbasics.md
    Original file line number Diff line number Diff line change
    @@ -1,12 +1,12 @@
    ## Git Commands
    # Git Commands

    Just wanted to thank Parker Cameron for putting 95% of this together. We will keep adding to this file as need be. Any suggestions email us: [email protected]

    ~ The PointStart Crew

    # Simple Commands/Actions
    ## Simple Commands/Actions

    Create a new repository on the command line
    ###Create a new repository on the command line

    ```
    touch README.md
    @@ -22,54 +22,64 @@ git remote add origin https://github.com/(User Name)/(Name of Repo).git
    git push -u origin master
    ```

    # Push an existing repository from the command line
    ### Push an existing repository from the command line

    ```
    git remote add origin https://github.com/zrosenbauer/IOBrewWebPage.git
    git push -u origin master
    ```

    # Cloning
    ### Cloning

    ```
    $ git clone
    $ git branch (YourBranchName)
    $ git checkout (YourBranchName)
    ```

    # Committing
    ### Committing

    ```
    $ git add --all
    $ git commit -m 'Commit message'
    ```

    # Uploading to GitHub
    ### Uploading to GitHub

    $ git push origin (YourBranchName)
    `$ git push origin (YourBranchName)`

    Merging (from Dev branch)
    ### Merging (from Dev branch)

    ```
    $ git checkout master
    $ git branch -d (YourBranchName)
    $ git checkout -b (YourBranchName)
    $ git checkout -b (YourBranchName)
    ```

    Merging (to Dev branch)
    ### Merging (to Dev branch)

    ```
    $ git checkout master
    $ git merge (YourBranchName)
    ```

    Resolve any conflicts
    *Make sure to resolve any conflicts*

    Uploading to GitHub after a Merge (to Dev branch)
    ### Uploading to GitHub after a Merge (to Dev branch)

    $ git push origin master
    `$ git push origin master`

    Uploading to GitHub after a Merge (from Dev branch)
    ### Uploading to GitHub after a Merge (from Dev branch)

    ```
    $ git push origin (YourBranchName)
    $ git push origin (YourBranchName)
    $ git push origin (YourBranchName)
    ```
  2. zrosenbauer revised this gist May 17, 2014. 1 changed file with 8 additions and 4 deletions.
    12 changes: 8 additions & 4 deletions gitbasics.md
    Original file line number Diff line number Diff line change
    @@ -1,14 +1,15 @@
    ## Git Commands

    Just wanted to thank Parker Cameron for putting 90% of this together. We will keep adding to this file as need be. Any suggestions email us: [email protected]
    Just wanted to thank Parker Cameron for putting 95% of this together. We will keep adding to this file as need be. Any suggestions email us: [email protected]

    ~ The PointStart Crew

    # Simple Commands/Actions

    Create a new repository on the command line

    `````touch README.md
    ```
    touch README.md
    git init
    @@ -18,13 +19,16 @@ git commit -m "first commit"
    git remote add origin https://github.com/(User Name)/(Name of Repo).git
    git push -u origin master`````
    git push -u origin master
    ```

    # Push an existing repository from the command line

    ```
    git remote add origin https://github.com/zrosenbauer/IOBrewWebPage.git
    git push -u origin master`
    git push -u origin master
    ```

    # Cloning

  3. zrosenbauer revised this gist May 17, 2014. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions gitbasics.md
    Original file line number Diff line number Diff line change
    @@ -8,7 +8,7 @@ Just wanted to thank Parker Cameron for putting 90% of this together. We will ke

    Create a new repository on the command line

    `touch README.md`
    `````touch README.md
    git init
    @@ -18,9 +18,9 @@ git commit -m "first commit"
    git remote add origin https://github.com/(User Name)/(Name of Repo).git
    git push -u origin master
    git push -u origin master`````
    Push an existing repository from the command line
    # Push an existing repository from the command line
    git remote add origin https://github.com/zrosenbauer/IOBrewWebPage.git
  4. zrosenbauer revised this gist May 17, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gitbasics.md
    Original file line number Diff line number Diff line change
    @@ -8,7 +8,7 @@ Just wanted to thank Parker Cameron for putting 90% of this together. We will ke

    Create a new repository on the command line

    `touch README.md
    `touch README.md`

    git init

  5. zrosenbauer revised this gist May 17, 2014. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions gitbasics.md
    Original file line number Diff line number Diff line change
    @@ -8,7 +8,7 @@ Just wanted to thank Parker Cameron for putting 90% of this together. We will ke

    Create a new repository on the command line

    'touch README.md
    `touch README.md

    git init

    @@ -24,7 +24,7 @@ Push an existing repository from the command line

    git remote add origin https://github.com/zrosenbauer/IOBrewWebPage.git

    git push -u origin master'
    git push -u origin master`

    # Cloning

  6. zrosenbauer created this gist May 17, 2014.
    71 changes: 71 additions & 0 deletions gitbasics.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,71 @@
    ## Git Commands

    Just wanted to thank Parker Cameron for putting 90% of this together. We will keep adding to this file as need be. Any suggestions email us: [email protected]

    ~ The PointStart Crew

    # Simple Commands/Actions

    Create a new repository on the command line

    'touch README.md

    git init

    git add README.md

    git commit -m "first commit"

    git remote add origin https://github.com/(User Name)/(Name of Repo).git

    git push -u origin master

    Push an existing repository from the command line

    git remote add origin https://github.com/zrosenbauer/IOBrewWebPage.git

    git push -u origin master'

    # Cloning

    $ git clone

    $ git branch (YourBranchName)

    $ git checkout (YourBranchName)

    # Committing

    $ git add --all

    $ git commit -m 'Commit message'

    # Uploading to GitHub

    $ git push origin (YourBranchName)

    Merging (from Dev branch)

    $ git checkout master

    $ git branch -d (YourBranchName)

    $ git checkout -b (YourBranchName)

    Merging (to Dev branch)

    $ git checkout master

    $ git merge (YourBranchName)

    Resolve any conflicts

    Uploading to GitHub after a Merge (to Dev branch)

    $ git push origin master

    Uploading to GitHub after a Merge (from Dev branch)

    $ git push origin (YourBranchName)

    $ git push origin (YourBranchName)