We have a few repo's like :
Site1:
- lib:
Site2:
- lib:
lib:
As you see lib is shared in both sites. Now when I use
[master] git fetch lib
Nothing happens. After that I use :
[master] git merge --squash -s subtree --no-commit lib
Then it starts deleting loads of files that belongs to the site.
If I try this: Update the Library Sub-Project from the Shared Library Remote http://www.codeproject.com/Articles/562950/GitplusSubtreeplusMergeplus-e2-80-93TheplusQuickpl
[master] git checkout lib
Checking out files: 100% (4521/4521), done.
Switched to branch 'lib'
[lib] git pull
Already up-to-date.
Then just checkout to the master, and run the command:
git merge --squash -s subtree --no-commit lib
This just deletes a whole load of files from my site and leaves a few files like its in a subfolder of lib.. Why doesen't this just update the lib to the correct version? and leave the files for the site?
After a reset I do get my project back
git reset --hard origin/master
How can I update the lib?
There is a remote branch setup.
$ git remote -v
lib https://github.com/***/lib.git (fetch)
lib https://github.com/***/lib.git (push)