xxxxxxxxxx
$ cd Documents
$ mkdir Test; cd Test/
$ git init
Initialized empty Git repository in /Users/SudeshnaSur/Test/.git/
xxxxxxxxxx
$ git status
On branch master
No commits yet
Untracked files:
test.txt
nothing added to commit but untracked files present
$ git add .
xxxxxxxxxx
git config --global user.email "email@example.com"
git config --global user.name "Your Name"
xxxxxxxxxx
$ git commit -m 'Adding a test file'
[master (root-commit) 07035c94e038] Adding a test file
1 file changed, 1 insertion(+)
create mode 100644 test.txt
$ git status
On branch master
nothing to commit, working tree clean
xxxxxxxxxx
$ git remote -v
origin git@github.com:SudeshnaSur/Test.git (fetch)
origin git@github.com:SudeshnaSur/Test.git (push)
xxxxxxxxxx
$ hub clone github/hub
Cloning into 'hub'
remote: Enumerating objects: 26, done.
remote: Counting objects: 100% (26/26), done.
remote: Compressing objects: 100% (22/22), done.
remote: Total 19712 (delta 7), reused 13 (delta 4), pack-reused 19686
Receiving objects: 100% (19712/19712), 6.76 MiB | 7.25 MiB/s, done.
Resolving deltas: 100% (12912/12912), done.
xxxxxxxxxx
$ cd hub
$ git checkout -b topic
Switched to a new branch 'topic'
$ echo “Hey” >test2.txt
$ git add .
$ git commit -m ‘Adding test 2’
[master cbb6fde5805a] Adding test 2
1 file changed, 1 insertion(+)
create mode 100644 test2.txt