![]() ![]() Nothing to commit, working directory clean (use "git branch -unset-upstream" to fixup) Your branch is based on 'origin/master', but the upstream is gone. Note that if you now run git branch, you'll now see the master branch listed. The git config commands are only needed if you haven't already told git who you are. > git config -local user.email git commit -m "added afile" Next, copy/move/create some files in the working folder, add them to git and create the first commit. You are not really on branch master (because git branch returns nothing) and so far, there are no commits. Nothing to commit (create/copy files and use "git add" to track)īut this is a lie. If you cd /path/to/work and run git status, you'll get something like: On branch master Take note of the warning - at this stage, you still don't have anything useful. This command will only work if /path/to/work does not exist or is an empty folder. Warning: You appear to have cloned an empty repository. Create a new working folder (no existing files) by cloning the empty repo git clone /path/to/bare/repo.git /path/to/work There are a couple of ways of doing this, depending upon whether you have existing files.Ģa. Next, we need to create a working folder. Although you can clone this repo, you cannot pull from it. As it stands, this repo is useless - it has no commits and more importantly, no branches. This creates a folder (repo.git) and populates it with git files representing a git repo. Initialised empty Git repository in /path/to/bare/repo.git/ ![]() I've tried to add some notes along the way for those less familiar with git.ġ. Note: this example uses local paths for the location of the bare repo, but other git protocols (like SSH indicated by the OP) should work just fine. I'm adding this answer because after arriving here (with the same question), none of the answers really describe all the required steps needed to go from nothing to a fully usable remote (bare) repo. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |