On Wednesday, 1 May 2013 14:04:07 UTC+1, And Ro wrote: 
> Hello! 
> I have a bare repository hosting on a local server and a few local clients 
> with working copies of that repository.
> I was going to a business trip so I had to clone the repository on a new 
> laptop before leaving. But I was in a great rush and did not have enough 
> time to connect the new laptop to the local network (it's quite 
> time-consuming). So, I just copied a working directory (from one of 
> computers) to a flash drive and then to the laptop.
> From what can I see on the new laptop:
> - the git history is present
> - git status shows all files marked as modified. (this is not so, all the 
> changes had been committed before I made a copy of a working directory)
> I need to implement some commits and then merge with the main repository 
> when I'm back.
> Please advise on how to organise my workflow.
> My thoughts are the following:
> Variant 1: 
> - Remove .git directory
> - Create a new local repository
> - Perform and commit the changes
> - When I'm back, link the bare repository and merge the repositories. 
> Variant 2: 
> - Fix the paths on the current repository (as I've mentioned before, all 
> the files are marked as new now)
> - Perform and commit the changes
> - When I'm back, link the bare repository and merge the commits.
> Please advise the best variant on how to implement the desired.
> Also please advise the commands I should use to merge the repos (Variant 
> 1) or commands to fix the paths and merge commits (Variant 2)
> Thanks in advance.
I suspect that you simply have new time stamps on those files and git 
thinks they have all 'changed'. Git doesn't store (in the repo objects) the 
file time stamps so in that sense they don't matter.
One option (takes backup first) is to simply use "git reset --hard" to 
force git to believe it has everything under control (I'm sure there are 
other commands to refresh the index etc). I'm assuming that you didn't have 
any changes that needed stashing (if so do a stash ;-)
Once you have reset you should be able to work on as normal, and when you 
re-connect to the network the remote addresses should 'just work' if thei 
paths look the same as on the other machine.

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.

Reply via email to