Reputation: 57
I completed MyProject1 and have uploaded it in git in fine way with commits after adding each new features. And now I'm starting MyProject2 and was trying to add the URL for the remote repository. But then I found out that I had mistakenly added the URL in Documents instead of MyProject1 folder because of which MyProject2 folder is also being tracked in MyProject1. And I'm not being able to add URL to MyProject2 but instead facing merge issues.
Is there any way to detach the track from my Document folder without deleting any of my files from Documents. Structure is this way(I'm using Linux):
Documents (And inside Documents there is:)
Upvotes: 0
Views: 98
Reputation: 3
Create a .gitignore
file following @Vinayagam R
Those methods won't affect other contributors working on the same remote repository:
If you want to stop tracking a file at certian point.
git update-index --assume-unchanged yourDirectoryName
--assume-unchanged
is the flag which means the files should not change locally. In other words, it is used when ignore files that you do not need to change locally (or should not change).
To revert it use update-index --no-assume-unchanged yourDirectoryName
In your working directory edit .git/info/exclude
Upvotes: 0
Reputation: 101
We can manually do it with below steps
Upvotes: 1