On Friday, May 26, 2017 at 6:17:43 PM UTC-4, Robert Glover wrote: > > Hi, > > I'm a new git user, and I am trying to clone a bare repository and having > difficulty making/pushing changes in the main/cloned repository. I believe > that I created the repository correctly under: >
You don't actually do any work in a bare repository. That's more for master-master, "archival" purposes, i.e. init bare, or clone bare, etc. However, you should be able to clone from a bare repository and push changes into that repository from the context of the clone. /home/gituser/project.git > > These folders/files are in that folder: > > branches config description HEAD hooks info objects refs > If you are diving head first into the files/folders of a bare repo you are doing something wrong. Should never ever do that unless you absolutely know what you are doing. And even then, I would discourage the practice. > Within this project.git folder, I cannot enter this command: > > echo 'TODO: Add contents for README' > README > > I receive the message: Permission Denied. > > In my cloned repository, I have this folder structure: > > ~/git_projects/project > > I used the "echo" command above to create a README file in this folder and > executed these commands: > > git status -s > git add . > get status -s > > This leaves me with: > > A README > > which seems okay. When I try to commit: > > git commit -m ‘Initial Commit’ > > nothing happens. When I type this: > > git log > > I receive the message: "fatal: your current branch 'master' does not have > any commits yet". > > When I try to push: > > git push origin master > > I receive the message: "error: failed to push some refs to > '/home/robert/git_projects/../../gituser/project.git'" > > Obviously, I don't know what I'm doing. Can someone make some suggestions? > https://git-scm.com/book/en/v1/Getting-Started I don't know if this is Windows or Linux for you, but the principles should be the same. HTH Thank you. > -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.