1 -- clone the branch. After modifying the local commit of the file, push back to the original branch fails and an error is returned:
Git push
[Email protected]'s password:
Counting objects: 21, done.
Compressing objects: 100% (11/11), done.
Writing objects: 100% (11/11), 1010 bytes, done.
Total 11 (Delta 9), reused 0 (delta 0)
Error: refusing to update checked out branch: refs/heads/Master
Error: by default, updating the current branch in a non-bare Repository
Error: is denied, because it will make the index and work tree inconsistent
Error: With what you pushed, and will require 'git reset -- hard' to match
Error: The work tree to head.
Error:
Error: You can set 'receive. denycurrentbranch' configuration variable
Error: 'ignore' or 'warn' in the remote repository to allow pushing
Error: Its Current branch; however, this is not recommended unless you
Error: arranged to update its work tree to match what you pushed in some
Error: Other way.
Error:
Error: to squelch this message and still keep the default behaviour, Set
Error: 'receive. denycurrentbranch' configuration variable to 'refuse '.
To git + SSH: // [email protected]/Media/linuxdata/working
! [Remote rejected] Master-> master (branch is currently checked out)
Error: failed to push some refs to 'git + SSH: // [email protected]/Media/linuxdata/working'
Click the following link to run $ git config 'receive. denycurrentbranch' warn in the target repo.
Http://stackoverflow.com/questions/2816369/git-push-error-remote-rejected-master-master-branch-is-currently-checked
2 -- after the file add commit is added, the push operation fails to return to the original branch, and an error is returned:
Counting objects: 20, done.
Delta compression using up to 24 threads.
Compressing objects: 100% (11/11), done.
Writing objects: 100% (11/11), 1.30 kib, done.
Total 11 (delta 5), reused 0 (delta 0)
Error:Insufficient permission for adding an object to repository database./objects
Refer to the following link to view the original Repo. Git directory permissions and find that. Git/Object/has no group write permission. Execute $ sudo chmod g + w-R. Git/object and then OK
Http://stackoverflow.com/questions/6448242/git-push-error-insufficient-permission-for-adding-an-object-to-repository-datab
3 -- git clone/git clone -- bare/git clone -- mirror difference
Http://stackoverflow.com/questions/3959924/whats-the-difference-between-git-clone-mirror-and-git-clone-bare
4 -- does not appear to be a git Repository
In this case, there are many permission issues. Check whether the user and group permissions in the full path of the entire repo directory are allowed to access
[Go to] git usage problems-solution memo