Skip to content

Instantly share code, notes, and snippets.

@cubeton
cubeton / gitlogaftermerge.md
Last active September 16, 2015 22:00
git log after merge
mnelson:myproject mnelson$ git log
commit 3e270876db0e5ffd3e9bfc5edede89b64b83812c
Merge: 4f1cb17 5381b7c
Author: Meghan Nelson <mnelson@hubspot.com>
Date:   Fri Sep 11 17:48:11 2015 -0400

    Merge branch 'master' of https://github.com/cubeton/mynewrepository

commit 4f1cb1798b6e6890da797f98383e6337df577c2a
@cubeton
cubeton / gitlog.md
Last active September 16, 2015 22:00
git log
mnelson:myproject mnelson$ git log
commit 3e270876db0e5ffd3e9bfc5edede89b64b83812c
Merge: 4f1cb17 5381b7c
Author: Meghan Nelson <mnelson@hubspot.com>
Date:   Fri Sep 11 17:48:11 2015 -0400

    Merge branch 'master' of https://github.com/cubeton/mynewrepository

commit 4f1cb1798b6e6890da797f98383e6337df577c2a
@cubeton
cubeton / pulloriginmaster.md
Last active September 16, 2015 22:01
gitpulloriginmaster
mnelson:myproject mnelson$ git pull origin master
remote: Counting objects: 1, done.
remote: Total 1 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (1/1), done.
From https://github.com/cubeton/mynewrepository
 * branch            master     -> FETCH_HEAD
   b345d9a..5381b7c  master     -> origin/master
Merge made by the 'recursive' strategy.
 mnelson.txt | 1 +
@cubeton
cubeton / addnewbranchgithub.md
Last active April 6, 2018 22:47
add a new branch to github
mnelson:myproject mnelson$ git push origin my-new-branch
Counting objects: 3, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 313 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To https://github.com/cubeton/mynewrepository.git
 * [new branch]      my-new-branch -> my-new-branch
@cubeton
cubeton / addgithub.md
Last active April 6, 2018 22:43
add repo to github
mnelson:myproject mnelson$ git remote add origin https://github.com/cubeton/mynewrepository.git
mnelson:myproject mnelson$ git push -u origin master
Counting objects: 3, done.
Writing objects: 100% (3/3), 263 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To https://github.com/cubeton/mynewrepository.git
 * [new branch]      master -> master
Branch master set up to track remote branch master from origin.
@cubeton
cubeton / secondcommit.md
Last active September 16, 2015 22:01
second commit
mnelson:myproject mnelson$ echo "making some more changes" >> mnelson.txt
mnelson:myproject mnelson$ git status
On branch my-new-branch
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

	modified:   mnelson.txt
@cubeton
cubeton / gitbranch.md
Last active September 16, 2015 22:01
git branch
mnelson:myproject mnelson$ git branch
  master
* my-new-branch
@cubeton
cubeton / branch.md
Last active September 16, 2015 22:01
create new branch
mnelson:myproject mnelson$ git checkout -b my-new-branch
Switched to a new branch 'my-new-branch'
@cubeton
cubeton / commit.md
Last active September 16, 2015 22:02
make a new commit
mnelson:myproject mnelson$ git commit -m "This is my first commit!"
[master (root-commit) b345d9a] This is my first commit!
 1 file changed, 1 insertion(+)
 create mode 100644 mnelson.txt
@cubeton
cubeton / addtostaging.md
Last active December 16, 2022 05:27
add to staging
mnelson:myproject mnelson$ git status
On branch master

Initial commit

Changes to be committed:
  (use "git rm --cached <file>..." to unstage)

	new file: mnelson.txt