0

I have Ububntu installed; at work I have my git account, basically to pull, commit and push.

Now I'm starting my own independant project; I will be using the same laptop; I would like to use Git because eventually I will also use the PC I have at home.

So I created a new account with my gmail, now how can I pull, commit and push my project without messing up with the office project??

Marco Sanchez
  • 788
  • 7
  • 22

1 Answers1

0

For an existing git project in your local directory you can do this:

cd <you-local-git-dir>
git remote add newrepo https://<your-new-git-url>.git
git push newrepo master

You can also embed a new user ID to the git URL like this:

https://userid@host:port/url-path.git

In which case the password could be asked depending on the access rights assigned to your user ID.

Oleg Gryb
  • 5,122
  • 1
  • 28
  • 40
  • The original poster is trying to use his own personal email account for his personal project. Your answer won't allow him to separate his work email from his personal email. –  May 21 '14 at 03:44
  • @Cupcake You're probably good at reading the author's mind, but it would be even better to hear from him personally. He's talking about "new independent project" and the best solution for this would be to create a new remote git repo. User ID could be included to the git URL. What's the problem? – Oleg Gryb May 21 '14 at 03:55
  • Thanx @OlegGryb I didn't try yet but I will this weekend. I'll let you know how it works. – Marco Sanchez May 22 '14 at 13:19