I have <path1>
in /f/gittest/foo
(remote).
I have <path2>
in /f/gittest/bar
(local).
Since I don't need remote to be a working copy right now, mostly because I can't push into an active branch, I made it bare.
I go through and create a .git directory and run git init --bare
inside /f/gittest/foo/.git
.
I go in and add a remote repo to the local repository, make files, add, commit, and push to the remote. Changes appear to push and the remote is successfully up-to-date. However, the files tracked by the local repository (let's say example1.txt and example2.txt) aren't shown in the remote (though I suppose are tracked in the remote repo). How do I get this remote directory to be updated with the files that were pushed? I had previously succeeded with this without fetching and without mirroring, though I can't recall how.
Double-checked behavior:
mkdir alpha/; mkdir beta/; cd beta/
mkdir .git/; cd .git/; git init --bare; cd ../../alpha/
git init; touch example1.txt
(Enter text into example1.txt)
git add example1.txt; git commit -m "Initial Commit"
git remote add destination ../beta/.git; git push destination master