git push having weird behavior? -
so i'm in process of learning git , i'm using sourcetree gui. have remote repository on server a(not bare repo working one). cloned remote repo onto local machine , created new file called "blah.txt" , added, committed changes local repo.
then after setting git config receive.denycurrentbranch ignore
, pushed remote repo local repo. however, after push, can't see file created(blah.txt) in remote repo.
however, when clone same remote repo different folder onto local machine, blah.txt appears again. can explain whats going on?
git push
pushes changes .git
directory in remote repo, not update files in working directory of remote repo.
you can git reset --hard
in remote repo update files, if there uncommitted edits files, lose changes. (you can make git hook runs git reset --hard
if want files automatically updated every time pull received.)
Comments
Post a Comment