I am trying to setup Git for a small team. I wish to use Visual Studio (VS 2015) as much as possible. I want each team member to have a local repo and we post our changes to a remote/central repo. I have an existing code base to start from.
What I have done:
- Create local repo: From my code base folder, run ‘git init’
- Loading my VS solution shows my Git repo (nice) and all files unstaged in Team Explorer | Changes view
- I commit these changes to the master branch by choosing Commit All
- Create remote repo: From my remote repo folder, run ‘git clone --bare c:\MyCodeBase’
I believe I have now established my local repo and created a fresh remote repo. Now, I tried to move on to working out the process of making a change to my local repo and pushing it to the remote repo. This is where I am failing.
What I did:
- Created a feature branch off ‘master‘ in my local repo
- Made a code change
- Committed the code change to the feature branch
- Merged the feature branch into the master branch.
Now I wish to push my local master branch to the remote master branch. (Is this a recommend workflow?)
My first step was to add a remote repo to VS. I did this in Team Explorer | Settings… However, I was a bit confused in that I was not provided a Browse button to specify the Fetch/Pull settings. Aren’t these supposed to be folders?
Now I am lost. How do I push my local master branch to the remote repo? In the Synchronization view, the Incoming Commits section states that the current branch does not track a remote branch (?). The Outgoing Commits section has a Push button, but it is disabled. I obviously do not get something.
Help with my specific questions is greatly appreciated. Any suggestions regarding overall workflow is also appreciated. I am simply trying to establish a simple workflow where we can work locally, update changes to a central/remote repo, and pull changes from that remote repo.