I got a remote git
repository, I cloned it to my local repository, made local changes and when I push I got the message that I cant push to the master branch:
[remote rejected] master -> master (branch is currently checked out)
I read that if I change the branch it works, I do it and works, but I can't work like that; I need that when I push changes from local to remote repository the changes apply in the same time to the files on remote repository, I don't want to return to master branch, or merge branches.
I read too that I can use bare repositories, it doesn't work for me.
I see some videos where guys push directly to remote repository and just need to enter a passphrase, but I don't know how to do all that to work like that.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…