Pointing existing source code to remote .git repository
User A and User B have the same code. User A creates a repository (git
init, git remote add origin <repo-url>, git commit, git push in that
order). Remote repository gets created and has the changes from User A.
User B already has the same changes locally but wan't to start pointing
and getting tracked by the same repository. How does User B achieve that?
I tried a git init followed by a git remote add origin <repo-url>. git
branch does not list any branches, not even master. What could be going
wrong here?
Extra note - The projects being added are already inside an existing git
repository i.e My project structure is Xdir/Ydir. Xdir is a git repo.
Everything I'm trying to do now is inside Ydir. That was not a problem for
User A. But somehow User B is having issues pointing to it.
No comments:
Post a Comment