$ brew install hub
$ hub --version
git version 2.25.0
hub version 2.14.1
$ cd Documents
$ mkdir Test; cd Test/
$ git init
Initialized empty Git repository in /Users/SudeshnaSur/Test/.git/
$ git status
On branch master
No commits yet
Untracked files:
test.txt
nothing added to commit but untracked files present
$ git add .
git config --global user.email "email@example.com"
git config --global user.name "Your Name"
$ 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
$ hub create
Updating origin
https://github.com/SudeshnaSur/Test
$ git remote -v
origin git@github.com:SudeshnaSur/Test.git (fetch)
origin git@github.com:SudeshnaSur/Test.git (push)
$ 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.
$ 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
$ hub fork –remote-name origin