Summary: I'm having difficulty getting an existing local repository to track a new bare remote repository.
What I've tried: I've attempted to push my local repo to the new bare repo while setting upstream tracking. Git tells me upstream tracking is happening, but I still don't see the branch being tracked in the local repo's log, even after fetching the remote repo.
I've also tried creating a bare clone from the local repo, hoping this would work in a similar fashion to cloning another local repo where tracking is set up automatically, but I still don't see a sign of tracking in the local repo's log.
Request: Would anyone be able to take a look at the background information below, and guide me where I may be going wrong, or may have an incorrect understanding about how to get my existing repo to track the new bare remote repo? Thank you, I've tried my hardest to research this already.
Background I work as a manufacturing engineer in a small team. We would like to setup a workflow using a central shared remote Git repo for the team. I've been trying to setup a demo of how this would function, with the "centralRepo.git" directory below being our central repo, and having other folders team members can clone the central remote to.
Because we already have existing work, but no existing central remote repo, we will be starting with an existing repo in "davesClones" that will be pushed to the central remote, and then cloned to other team members folders as needed, such as "stevesClones."
What I'm expecting to see if tracking is working: If I clone a regular local repo, tracking is automatically setup and the log shows me my clones's own branches, along with the "origin" branch that it is tracking from the directory it was cloned from, as shown in the screenshot below circled in blue:
Attempt #1: Pushing w/--Set-Upstream:
I have tried pushing my existing local repo to the new central remote repo using
git push --set-upstream <remote> master
as shown below, and even though the output appears to say tracking was setup, I don't see any tracking happening in the git log like I did when cloning a regular repo, even after using fetch. Examples below show how I'm missing the origin tracking branch in log after trying the above steps:
Attempt #2: Clone -bare:
I also tried cloning the existing repo to a new bare repo, hoping this would automatically establish tracking, but as shown below the log doesn't appear to show any tracking happening, even after fetching:
Any idea why I'm not seeing tracking in my log? (Meaning how come after cloning a standard local repo I see a tracking [origin/master, origin head] but am unable to get this in my log when either using push --set-upstream to push local repo to remote, or when using git clone --bare to clone the local repo to a bare remote?)
Also the local repo does have a commit made in it, so it is not empty when pushing or cloning to the remote.
Thank you!