Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

GIT

Name: Anonymous 2010-05-13 14:15

So git is pretty cool, however I feel it has been modeled in Linus' image, so it's his way or the highway.

One thing that is bothering me a lot is that you can't specify copy sources. Now, if you're copying or moving a file normally, passing enough -Cs might do the trick, as long as the code is also present (or being removed) somewhere in the same commit.

However consider this scenario. Let's assume a linear history for simplicity. On some rev you delete a file, you don't think you'll need it anymore. 10000 revs later, you suddenly want it back.

Now, on svn, you just copy the file from the old revision inside the repo, using svn copy. In git, all you can do is add the file back. However at this point the history is effectively lost (for commands like log or blame). Of course it's still in the repo and if you can remember the original file you might manually look for it, but it's pretty useless compared with svn.

So how would you handle this specific case? Does mercurial support this better? I heard somewhere it supports copies. However I also heard if you delete a file and later add one with the same name, you'll get the log entries of the old file too, which is also wrong (maybe less so).

Name: Anonymous 2010-05-13 14:17

>>1
how dare you question linus!

Name: Anonymous 2010-05-13 16:07

There's probably another way of doing this.
The best workflow for git is quite different then that in svn.
First thing comes to mind would be doing something to the effect of:
git checkout YE_OLDE_TAG
git branch OLD_SHIT
git checkout master
git merge OLD_SHIT
git checkout HEAD # Resolves all conflicts with OLD_SHIT
git rm ... # old stuff you don't want
git commit

It's not as straightforward as
git checkout OLD_SHIT file.c
but gets the job done if you really need it.

Name: Anonymous 2010-05-13 16:11

>>3
different then that
Get the fuck out.

Name: Anonymous 2010-05-13 16:23

If git were so Linus-like then why is everybody on Github using macs?

Name: Anonymous 2010-05-13 16:27

>>3
I tested this. It didn't work. The merge doesn't merge anything, seeing as there are no new changes for that file.

Name: Anonymous 2010-05-13 16:33

>>6
Well, if you have a conflict, then what do you expect?

Name: Anonymous 2010-05-13 16:44

>>7
Perhaps I wasn't clear. I had to modify the file to create the conflict. I want the conflict. I don't want to modify the file if it can be avoided.

Name: Anonymous 2010-05-13 17:37

Ok, you can do this without modifying, just by renaming(/moving) the file.

Name: ​​​​​​​​​​ 2010-10-26 1:49

Name: Anonymous 2010-12-17 1:39

Are you GAY?
Are you a NIGGER?
Are you a GAY NIGGER?

If you answered "Yes" to all of the above questions, then GNAA (GAY NIGGER ASSOCIATION OF AMERICA) might be exactly what you've been looking for!

Name: Anonymous 2011-02-03 3:09

Don't change these.
Name: Email:
Entire Thread Thread List