[git-users] Re: Preserving changes locally, and never commit them to anywhere

2014-02-21 Thread Damien Robert
Thomas Ferris Nicolaisen  wrote in message
eb8771c9-9ba7-421c-a616-11d35b107...@googlegroups.com:
 Is there a way to tell GIT that after upgrading the solution file I 
don't˙
 want it to concider this change as one that needs to be added to the 
commit?
 Something like: GIT knows that there are couple of lines in one file 
that˙
 are only used by me and don't need to be commited. Hence IDE won't 
upgrade˙
 this file anymore, and I don't have to revert it each time I commit.
˙
 Try --assume-unchanged with git update-index:˙
 https://www.kernel.org/pub/software/scm/git/docs/git-update-index.html

In this case it would be better to use --skip-worktree. --assume-unchanged
is to speed-up index refreshs by telling that it can assumes some paths were
not changed, while --skip-worktree is to explicitly tell git not to touch
this file.
See for instance
http://stackoverflow.com/questions/13630849/git-difference-between-assume-unchanged-and-skip-worktree
there is a great summary at
http://fallengamer.livejournal.com/93321.html

Regards

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[git-users] Re: Preserving changes locally, and never commit them to anywhere

2014-02-21 Thread Thomas Ferris Nicolaisen
On Friday, February 21, 2014 1:42:27 PM UTC+1, Damien Robert wrote:

 Thomas Ferris Nicolaisen  wrote in message
 eb8771c9-9ba7-421c-a616-11d35b107...@googlegroups.com javascript::
  Is there a way to tell GIT that after upgrading the solution file I 
 don't˙
  want it to concider this change as one that needs to be added to the 
 commit?
  Something like: GIT knows that there are couple of lines in one file 
 that˙
  are only used by me and don't need to be commited. Hence IDE won't 
 upgrade˙
  this file anymore, and I don't have to revert it each time I commit.
 ˙
  Try --assume-unchanged with git update-index:˙
  https://www.kernel.org/pub/software/scm/git/docs/git-update-index.html

 In this case it would be better to use --skip-worktree. --assume-unchanged
 is to speed-up index refreshs by telling that it can assumes some paths 
 were
 not changed, while --skip-worktree is to explicitly tell git not to touch
 this file.
 See for instance

 http://stackoverflow.com/questions/13630849/git-difference-between-assume-unchanged-and-skip-worktree
 there is a great summary at
 http://fallengamer.livejournal.com/93321.html


Nice! Learned something new there :)

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[git-users] Re: Preserving changes locally, and never commit them to anywhere

2014-02-19 Thread Thomas Ferris Nicolaisen
On Wednesday, February 19, 2014 11:35:21 AM UTC+1, Oleg Kosmakov wrote:

 Hi everyone.

 My Git experience is somehow basic, so I don't even know which function 
 name I am looking for.

 My question is as follows: I am working on one public project on GitHub. 
 That project is being developed in Visual Studio *2012*.
 I am using Visual Studio *2013*. These 2 IDEs are mostly compatible, 
 except the latter adds couple of lines to solution file, thus making it 
 VS2013 file, still preserving compatibility with older versions.

 My usual working flow is to open the solution (and it will update the 
 solution file), write some code, save changes to my files. Close the IDE. 
 Revert changes to solution file. And commit, at last.

 Basically, I'd like to remove 2 unneeded steps from my working flow: 
 updating solution file, reverting it back.

 Is there a way to tell GIT that after upgrading the solution file I don't 
 want it to concider this change as one that needs to be added to the commit?
 Something like: GIT knows that there are couple of lines in one file that 
 are only used by me and don't need to be commited. Hence IDE won't upgrade 
 this file anymore, and I don't have to revert it each time I commit.

 Any ideas?


Try --assume-unchanged with git update-index: 
https://www.kernel.org/pub/software/scm/git/docs/git-update-index.html

I'm not sure if it will handle things gracefully when you pull and others 
have made changes in the solution file. Probably you will get a conflict 
that you have to resolve. You could work around that doing something like 
this, I suppose: http://stackoverflow.com/a/930495/266875 - or just resolve 
it manually.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.