Git: don't promote
I am new to git. I forked another repository a while ago. I wanted to start a fresh start, so I grabbed my private clone and added a remote for the upstream repository. I can't pull from the repository because it says some files are not out of date. I don't care about these files, I want everything from a remote pool. Is there a way that I can quickly resolve this?
source to share
To check all files as they should be according to the repository, try either
git checkout -f
or
git reset --hard
Sometimes you may need to delete any untracked / ignored files that might conflict with things that have been added upstream since then:
git clean -xdf
-f
indicates to clean up all files and delete them (as this can be dangerous!), -x
tells him to delete ignored files as well, and -d
tells him to delete entire unexplored directories like Well. To see what he was going to remove, change -f
on -n
to dry running.
source to share