user1800361
user1800361

Reputation:

git error push failed

I get this error when I try to push my change to local repo

remote: error: its current branch; however, this is not recommended unless you[K
remote: error: arranged to update its work tree to match what you pushed in some[K
remote: error: other way.[K
remote: error: [K
remote: error: To squelch this message and still keep the default behaviour, set[K
remote: error: 'receive.denyCurrentBranch' configuration variable to 'refuse'.[K
To C:\LocalRepositories\CompareDateTime
 ! [remote rejected] master -> master (branch is currently checked out)
error: failed to push some refs to 'C:\LocalRepositories\CompareDateTime'

Upvotes: 0

Views: 76

Answers (1)

mgarciaisaia
mgarciaisaia

Reputation: 15560

You're trying to push to the checked out branch of your remote, and, by default, you can't.

See this question for more help.

Upvotes: 2

Related Questions