Skip to content

Instantly share code, notes, and snippets.

@ymendel
Created August 29, 2008 16:48
Show Gist options
  • Save ymendel/8003 to your computer and use it in GitHub Desktop.
Save ymendel/8003 to your computer and use it in GitHub Desktop.
Cassady:~/dev/scratch yossef$ mkdir test_repo
Cassady:~/dev/scratch yossef$ cd test_repo/
Cassady:~/dev/scratch/test_repo yossef$ git init
Initialized empty Git repository in /Users/yossef/dev/scratch/test_repo/.git/
Cassady:~/dev/scratch/test_repo yossef$ touch blah
Cassady:~/dev/scratch/test_repo yossef$ git add .
Cassady:~/dev/scratch/test_repo yossef$ git commit -m "initial commit"
Created initial commit 2f456dc: initial commit
0 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 blah
Cassady:~/dev/scratch/test_repo(master) yossef$ git co -b branch
Switched to a new branch "branch"
Cassady:~/dev/scratch/test_repo(branch) yossef$ touch feh
Cassady:~/dev/scratch/test_repo(branch*) yossef$ git add .
Cassady:~/dev/scratch/test_repo(branch*) yossef$ git commit -m "commit"
Created commit f87b67d: commit
0 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 feh
Cassady:~/dev/scratch/test_repo(branch) yossef$ git co master
Switched to branch "master"
Cassady:~/dev/scratch/test_repo(master) yossef$ git merge branch
Updating 2f456dc..f87b67d
Fast forward
0 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 feh
Cassady:~/dev/scratch/test_repo(master) yossef$ git name-rev HEAD
HEAD branch
Cassady:~/dev/scratch/test_repo(master) yossef$ git branch
branch
* master
Cassady:~/dev/scratch/test_repo(master) yossef$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment