GIT: Difference between revisions

From DaqWiki
Jump to navigation Jump to search
m (New page: = GIT NOTES = = Create personal "pullable" repository = <pre> $ cd ~/public_html/git $ git init --bare rpms.git Initialized empty Git repository in /home/olchansk/public_html/git/rpms.gi...)
 
Line 1: Line 1:
= GIT NOTES =
= GIT NOTES =


= Create personal "pullable" repository =
== Create personal "cloneable" repository ==


<pre>
<pre>
Line 7: Line 7:
$ git init --bare rpms.git
$ git init --bare rpms.git
Initialized empty Git repository in /home/olchansk/public_html/git/rpms.git/
Initialized empty Git repository in /home/olchansk/public_html/git/rpms.git/
$ cd rpms/hooks
$ mv post-update.sample post-update
$ chmod a+x ./post-update
$ cd ~/git/
$ cd ~/git/
$ git init rpms
$ git clone ~/public_html/git/rpms.git rpms
Initialized empty Git repository in /home/olchansk/git/rpms/.git/
warning: You appear to have cloned an empty repository.
$ cd rpms
$ date > test
$ git add test
$ git commit -m"test"
[master (root-commit) 9236a84] test
$ git push origin master
To /home/olchansk/public_html/git/rpms.git
* [new branch]      master -> master
$ rm test
$ date > test
$ git add test
$ git commit -m"test"
[master 54a6b4e] test
$ git push
To /home/olchansk/public_html/git/rpms.git
  9236a84..54a6b4e  master -> master
$ ssh to somewhere else
$ git clone http://ladd00.triumf.ca/~olchansk/git/rpms.git rpms
</pre>
</pre>

Revision as of 11:45, 6 February 2013

GIT NOTES

Create personal "cloneable" repository

$ cd ~/public_html/git
$ git init --bare rpms.git
Initialized empty Git repository in /home/olchansk/public_html/git/rpms.git/
$ cd rpms/hooks
$ mv post-update.sample post-update
$ chmod a+x ./post-update 
$ cd ~/git/
$ git clone ~/public_html/git/rpms.git rpms
warning: You appear to have cloned an empty repository.
$ cd rpms
$ date > test
$ git add test
$ git commit -m"test"
[master (root-commit) 9236a84] test
$ git push origin master
To /home/olchansk/public_html/git/rpms.git
 * [new branch]      master -> master
$ rm test
$ date > test 
$ git add test
$ git commit -m"test"
[master 54a6b4e] test
$ git push
To /home/olchansk/public_html/git/rpms.git
   9236a84..54a6b4e  master -> master
$ ssh to somewhere else
$ git clone http://ladd00.triumf.ca/~olchansk/git/rpms.git rpms