I've seen this command floating around on various sites.
git checkout --track -b <...>
If I create a bare repo on a remote server and work from two different location. What's the quickest and "approved" way of doing so?
What I did was, I created the initial repo on my laptop and then pushed the changes to the "origin" where my VPS repo is (the bare). Now, on my desktop, should I be cloning my repo? I ask because I have two branches, "dev" and "master." Once I'm on my desktop, I wasn't sure if I should be "tracking" the repo (see above) or should I be cloning first? What if I wanted to work on the dev branch, is that when I checkout using the --track directive?
Here's what I've done so far.
On laptop
cd devproject
git init
git add .
git commit -m "My first commit"
On VPS Repo
mkdir /home/sam/devproject.git
cd /home/sam/devproject.git
git --bare init
exit
Back to laptop
cd devproject
git remote add origin ssh://myserver.com/home/sam/devproject.git
On Desktop (??)
git clone <..>