Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sync two computers and also use git

Here is my situation:

I have two machines- A desktop and a laptop the home folders of which I keep in sync using unison. This setup works fine as I can carry my work around and have everything readily aviable. Now I want to throw git into this mix.

I have a remote repo set up in bitbucket.org. What I want to be able to do is periodically commit code from any of the machines ( as both are in sync ). However I am wondering if I set up the same git in both the machines will that create a conflict. Also the files are synced using unison...how will this affect git is another thing that worries me.

Any pointers as to how I might achieve this will be most helpful.

Thank you all and regards,

Sameer

like image 343
anikomei Avatar asked Mar 16 '26 12:03

anikomei


1 Answers

I wouldn’t synchronize the Git directories via unison. I keep all my source repositories in a src subdirectory of my personal files directory, and have it ignored in unison.

From my unison configuration:

root = /home/igor/
root = ssh://example.com/

path = files

ignore = Path files/src/*
like image 116
igor Avatar answered Mar 18 '26 01:03

igor



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!