1

While working on my first project using Github, I ran into a few problems. I started using the xCode source control but then switched to using terminal.

1) I seem to have duplicates when I try to look at my remote directories.

$ git remote -v
NavCtrl https://github.com/.../projectabc.git (fetch)
NavCtrl https://github.com/.../projectabc.git (push)
NavCtrl https://github.com/.../projectabc.git (fetch)
NavCtrl https://github.com/.../projectabc.git (push)

Is it safe to delete one of them since they have the same exact name.

2) When I push, is there a difference in me using

$ git push origin master

and

$ git push origin projectabc/master

3) Can I safely just continue using the terminal without doing anything in xCode. In other words, do I have to somehow delete the source control from xCode to avoid running into problems? If yes, how do I do so?

Boris R
  • 79
  • 9

1 Answers1

1

1/ Yes you can delete the double entry, by editing the .git/config file in your repo

2/ git push origin projectabc/master would push the local branch projectabc/master to the remote repo origin.
It is best to stick with git push origin master (or better: git push -u origin master for the first push, and git push for the next ones: see "Why do I need to explicitly push a new branch?")

3/ In theory, yes: it can depends on your version of XCode, but it (XCode) should be able to synchronize with the new git repo status once you have done your modifications with the command-line.

Community
  • 1
  • 1
VonC
  • 1,042,979
  • 435
  • 3,649
  • 4,283
  • remote.projectabc.url=https://github.com/username/projectabc.git remote.projectabc.fetch=+refs/heads/*:refs/remotes/projectabs/* branch.master.remote=projectabc branch.master.merge=refs/heads/master branch.Assignment3.remote=projectabc branch.Assignment3.merge=refs/heads/projectabc remote.origin.url=https://github.com/usernam/projectabc.git remote.origin.fetch=+refs/heads/*:refs/remotes/origin/* which one would i delete? – Boris R Jan 20 '16 at 19:51
  • 1
    @BorisR Actually in that case, none: you do have two remotes (projectabc and origin). In that regard, the output of `git remote -v` is expected. – VonC Jan 20 '16 at 19:55
  • Thanks for all the help! @VonC – Boris R Jan 20 '16 at 19:58