Tag Archives: clone

git: general commands

git init // initialize new repository
git remote add origin ssh://username@domain.tld/path/to/git/project.git
git add . //add all files in this folder to repository
git commit -a -m 'commit description' // make commit
git checkout -b new // create new branch
git checkout master // use master branch
git push // send changes to repository
git pull // take changes from repository
git reset --hard COMMIT // reset to COMMIT
git reset --hard HEAD // reset to last commit
git reset --hard HEAD-1 // reset to one from last
git merge new // if you in another branch will merge change in new for current branch
git reflog // list of last commits
git log // git logs
git show COMMIT // list of change in commit
git clone ssh://username@domain.tld/path/to/git/repository

system clone on the fly

I'll copy os from server1 to server2:

server1:

git clone git://github.com/yurial/netio.git

cd netio && ./configure && make && make install

server2:

git clone git://github.com/yurial/netio.git

cd netio && ./configure && make && make install

server1:

netio -i'every:tar -cf — / --exclude /tmp --exclude /proc --exclude /sys --exclude /home |gzip -c' -l tcp://0.0.0.0:22333

server2:

netio -o'every:gunzip|tar xf -' tcp://server1_ip:22333


Don't remember to install configure your boot-loader and rewrite mbr.