Reputation: 7920
When I git pull
repository info, all of my repository folders end up in my user's root folder. Instead, I want git to pull each repository into a folder with the repository name, but inside my a folder called git-repositories
in the root of my user.
I tried cd
'ing into ~/git-repositories/blogger-templates
(blogger-templates is the repo name) and then running
git pull https://github.com/blue-ice/blogger-templates
but all of the folders from the repository ended up in my root folder instead. How can I make them go into ~/git-repositories/blogger-templates
?
Upvotes: 0
Views: 606
Reputation: 2404
Visit the github repo web page at:
https://github.com/blue-ice/blogger-templates
On the right sidebar, you'll see this:
SSH Clone URL
[email protected]:blue-ice/blogger-templates.git
The first time you retrieve a repository from GitHub, you want to use git clone
git clone [email protected]:blue-ice/blogger-templates.git
After the initial git clone
, you can use git pull
and things will behave as you expect.
Upvotes: 1
Reputation: 376
Seems like you 've made/cloned a repo in your home dir. Run git clone url_to_remote path_where_you_want_your_local
. Now git pull
will update files in the path you provided in the second argument (note that you have to be inside the local repo dir to pull). Also it would be good to remove .git dir from your home.
Upvotes: 1