Reputation: 1
I have cloned this repository from Git onto my local machine in a folder. there seem to be a lot of errors concerning build issues(deploying the application). i haven't touched the code in terms of any changes...i haven't forked anything... my question is, can i clone the repository again onto a fresh folder and start with the dependency installations again?(node, NPM, bower, gulp, etc.).... will it affect anything?
i want to make sure nothing is affected if i clone it again. the errors i get are more on the build side...like dependency errors...i want to negate all of that by starting afresh. can someone please tell me if ignoring the already cloned repository and cloning it again in a fresh folder is ok?
Upvotes: 0
Views: 1433
Reputation: 12528
Yes, you can freely re-clone a Git
repository in a different directory that is not a subdirectory of a current directory that contains .git
. However, you don't even have to do that. If you don't care about your build products and want to remove all of them but leave original files tracked by Git
untouched you can do this:
$ git clean -dxf
-dxf
options mean:
-d Remove untracked directories in addition to untracked files. If an
untracked directory is managed by a different git repository, it
is not removed by default. Use -f option twice if you really want
to remove such a directory.
-x Don't use the standard ignore rules read from .gitignore (per
directory) and $GIT_DIR/info/exclude, but do still use the ignore
rules given with -e options. This allows removing all untracked
files, including build products. This can be used (possibly in
conjunction with git reset) to create a pristine working directory
to test a clean build.
-f, --force If the git configuration variable clean.requireForce is
not set to false, git clean will refuse to run unless given -f or
-n.
Upvotes: 2