Mailinglist Archive: yast-devel (50 mails)

< Previous Next >
Re: [yast-devel] Moving Clients to 'lib' && Keeping the History
On Fri, 4 Dec 2015 16:06:20 +0100
rneuhauser@xxxxxxx wrote:

# lukas.ocilka@xxxxxxxx / 2015-12-04 13:55:00 +0100:
Hi,

You probably remember that Martin has moved code from installation
clients from src/clients to src/lib/installation/clients recently,
unfortunately this move has removed all the history from those new
files [#1][#2].

I've found a way how to move the content and still keep the history
[#3][#4], this is what I did:

1. Moved files from scr/clients to lib/users/clients with `git mv`
2. Pushed this change as a separate commit to my repo
3. Added new clients to scr/clients calling lib/users/clients/*
4. Adapted Makefile.am in src to rake (take) care about libs
5. Pushed again

The trick was to persuade git that I have just moved files from one
location to another. I've probably discovered America today, but it
still might be helpful to you :)

git does not track moves/renames. unlike some other versioning tools
like svn or hg, git does not attach any "identity" to a file.

i don't know what "this move has removed all the history from those
new files" means, but it's probably about a github's shortcoming.


Git can recognize it itself, even if not explicitelly tracked. Just try
move file and then e.g. git log --follow new_file and you will see
history off old file too
--
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: yast-devel+owner@xxxxxxxxxxxx

< Previous Next >