Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I clone my git repo of sublime-text-2 settings to another computer

I have my current sublime-text-2 "Packages/User" folder in a git repo (on github)

How do I clone it into an existing folder "Application Support/Sublime Text 2" now that I am on a new computer?

Here is the repo:
http://github.com/andxyz/sublime-text-2-configs

Here is the existing folder on the new computer:

cd /Users/andxyz/Library/Application\ Support/Sublime\ Text\ 2/Packages/User
like image 427
andxyz Avatar asked Apr 01 '14 03:04

andxyz


People also ask

How do I pull git to another computer?

On computer 1, clone the repo, create a branch, push your branch back to github. On computer 2, clone the repo, pull the branch you created down, make a change, and then push it back.

How do I clone a remote git repository?

To Git clone a repository navigate to your preferred repository hosting service like GitHub, select the repository you want to clone, copy the repository URL via HTTPS or SSH, type git clone in the command line, paste the URL, and hit enter .


1 Answers

The following worked for me on an OSX mavericks 1.9.2 machine (after I got my github ssh clone stuff working) I did this:

git clone [email protected]:andxyz/sublime-text-2-configs.git ~/temp-sublime-text-2-configs
mv ~/temp-sublime-text-2-configs/.git ~/Library/Application\ Support/Sublime\ Text\ 2/.git
rm -rf ~/temp-sublime-text-2-configs
cd ~/Library/Application\ Support/Sublime\ Text\ 2/
git checkout --force master

The reasoning being that we can move the hidden .git folder from our temp-repo into the existing folder. Then move to that folder and force a git checkout with --force.

like image 147
andxyz Avatar answered Oct 12 '22 21:10

andxyz