On Mon, Jul 30, 2012 at 9:02 PM, Owen Densmore <[email protected]> wrote: > (Just to be clear in case I've used the wrong terminology: My src/ folder is > in my Dropbox folder thus shared across all my systems. I wish to use > github as my remote repository. Being noob, I hope this has been clear! > So...) > > OK, looks like src/ in Dropbox, used with Git/GitHub is a bad idea. Sigh.
Or. I think it is ok to symlink your src folder into Dropbox and to keep .git folder out of Dropbox. This will allow you to have your current checkouted working copy on all machines up to date but also will not harm your repo data. In this case you need to keep an eye on where the HEAD is pointing (what is the current last commit known to local git repo) across all machines you will sync your repo. I recommend the following files layout to achieve described scenario: project_name/ - src/ - .git/ Dropbox/ - project_name/ # symlink to "project_name/src" Not very clear solution as you need to keep track of the repo in several places. But it will not harm your ".git" folder and will do the trick. In real life you probably need to follow this scenario if you do not want to push not finished code to the main repo. But as Linus could say, then you are using git in wrong way. You could easily do the same if you make temporary branch (say it named "tmp") from all of the not already commited changes and push this branch to the main repo. Than you will be able to do on the second machine to continue your suspended work: 1. git fetch 2. git merge --squash --no-commit origin/tmp 3. git reset 4. git push origin :tmp After this you will have exactly the same repository and working copy state as on your first machine where you've suspended the work and will not have "tmp" branch in main repo. It is good practice to include your username in the name of such temporary branch, e.g. "owen-tmp", if you are not the only person who uses that repo. But it completely depends on the your branch naming convention. -- Serge Matveenko [email protected] http://www.ohloh.net/accounts/lig http://ru.linkedin.com/in/sergematveenko -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
