I've been 'playing' with git on my own machine for 6 months now, and really loving it.
However, I'm finding it difficult to really grok how I would use it in a team/enterprisey environment. (I'm wondering whether Eric Sink is right).
I started out trying to install a git server on windows, but that didn't go too well.
So I wondered about just setting up a second repository on my own machine and starting to get a hang on pulling/pushing to that.
Do you know of any good articles for starting 'simple' like that, or do you have any tips on grokking the next level?
In order to change the URL of a Git remote, you have to use the “git remote set-url” command and specify the name of the remote as well as the new remote URL to be changed. For example, let's say that you want to change the URL of your Git origin remote.
The git remote command lets you create, view, and delete connections to other repositories. Remote connections are more like bookmarks rather than direct links into other repositories.
If:
You simply can:
git clone --bare /path/to/your/first/repo
cd /path/to/your/first/repo
git remote add bare_repo /path/to/bare/rep
git push bare_repo
git pull bare_repo
In other words, the file protocole is supported as a legitimate URL for remote repos.
See git fetch
, section URL:
For local repositories, also supported by git natively, the following syntaxes may be used:
/path/to/repo.git/
file:///path/to/repo.git/
Try Git Magic, which was the first thing I read when learning Git, and which was great for helping me understand what I was doing -- chapter 3 is all about dealing with more than one repository.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With