On Sat, May 3, 2014 at 6:41 AM, Jason Curl <[email protected]> wrote: > On Sat, May 3, 2014 at 1:11 PM, Felipe Contreras > <[email protected]> wrote:
>> I often do something similar. I think the easiest is to export GIT_DIR >> to the repository you want to update, and then change directory where >> you have the content you want to compare. >> >> You can do 'git diff' and 'git add' and 'git commit' and GIT_DIR repo >> will be updated. >> > As I've only started using git yesterday (migrated everything from SVN to > GIT and made some inroads), do you have an example, or could point to a > tutorial? So, for example I have Git repository called 'dotfiles' where I track the configurations in my $HOME. Many people have those repositories[1]. I have it in ~/dotfiles, but the real location of the Git directory is ~/dotfiles/.git. So I go to my home directory and do this: % export GIT_DIR=~/dotfiles/.git Now I can do `git diff` and see that for example my .alias file has modifications I don't have in my git repository, so I can do `git add .alias` and `git commit`. [1] https://github.com/search?q=dotfiles -- Felipe Contreras -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
