One git to bring them all, and in a repo bind them.

I had to reunite various git repos under a new one. To do this without losing logs, I found a stackoverflow hint that worked for me.

# add and get the old repo data
git remote add old_repo
git fetch old_repo

# merge into my master without commit…
git merge -s ours –no-commit old_repo/master

# …we need to relocate in the foo/ subdirectory before
git read-tree –prefix=foo/ -u rack_remote/master

# now… commit!
git commit -m “Imported foo as a subtree.”

The #git log presents files in the old place, so git log foo/ doesn’t work. We can instead
diff between various releases simply with

git diff rev1 rev2 —

yet another git quickstart

I heard a lot about git, the “new” version control system, and i decided to try it for one of my floss project.

Git main advantage is the capability of manage multiple source repositories at the same time. So let’s start

1- jon creates a local repository
# git init myproject/
# git add myproject/*.py
# git commit -m “first import”
2- jon copies his local repository to a remote server
# git clone myproject/ ssh://
2.1- define the remote repository as the master one
# git remote add origin ssh://

3- mary checks out from the remote server
# git clone ssh:// myproject/

4- jon modifies his files and commit to the local repo
# touch myproject/README
# git add myproject/README
# git commit myproject -m “added README file”
4.1 – commit (aka push) changes to a remote server he sets as master
# git push origin master:refs/heads/master

5- mary updates from the remote server
# git pull ssh://