Git

Apologies: this may only make sense to me…

bash$ mkdir Trialgit
bash$ cd Trialgit/
bash$ echo Wonderful > file1.txt
bash$ git init
Initialized empty Git repository in /home/jonathan/Desktop/Trialgit/.git/
bash$ git add .
bash$ git commit -a
Created initial commit 61931db: initial commit
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 file1.txt


~/Desktop > git clone mothership:~/Desktop/Trialgit Trialhome
Initialized empty Git repository in /home/jonathan/Desktop/Trialhome/.git/
mothership's password:
remote: Counting objects: 3, done.
remote: Total 3 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (3/3), done.
~/Desktop > cd Trialhome/
~/Desktop/Trialhome > ls
file1.txt
~/Desktop/Trialhome > echo "One more thing" » file1.txt
~/Desktop/Trialhome > more file1.txt
Wonderful
One more thing
~/Desktop/Trialhome > git commit -a
Created commit 722c0b6: one more line
1 files changed, 1 insertions(+), 0 deletions(-)
~/Desktop/Trialhome > git push mothership:~/Desktop/Trialgit/.git master:refs/remotes/B/master
mothership's password:
Counting objects: 5, done.
Writing objects: 100% (3/3), 275 bytes, done.
Total 3 (delta 0), reused 0 (delta 0)
To mothership:~/Desktop/Trialgit/.git
* [new branch] master -> B/master


bash$ git merge B/master
Updating 61931db..722c0b6
Fast forward
file1.txt | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
bash$ more file1.txt
Wonderful
One more thing


~/Desktop/Trialhome > git pull


More fun stuff:

git config remote.origin.push master:refs/remotes/curly/master
git push origin
mothership's password:
Total 0 (delta 0), reused 0 (delta 0)
To mothership:~/Desktop/Trialgit
* [new branch] master -> curly/master

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Share Alike 2.5 License.