My team has a repository of many C#/.NET projects coded in Visual Studio 2015 and we are trying to migrate our codebase from SVN to Git hosted on Bitbucket. One thing I'm struggling with after the migration is how to cleanly switch between tags using Sourcetree. The problem is that when I compile and run my application from master, many DLLs and other binaries are generated in my project folder. If I then checkout a new tag on Sourcetree (with "Clean (discard all changes)" selected), I can see all of my DLLs are still there and rebuilding and running the application can result in some weird behaviour that can only be explained by having the old DLLs in there.
Basically, my question is: is there a way to checkout a tag in Sourcetree truly cleanly so that the state of the repository is just as if I freshly checked out the repo from remote and then immediately switched to a new tag?
Hi Ian, afaik that's what should be happening. You might want to have a look at git clean, although this is a command that needs to be run in the command line, as it's not implemented in Sourcetree. You can read more about it at git-clean.
Hope that helps!
Hmmm, so you mean that you have ignored files that are still appearing? Keep in mind that if the files have already been tracked, .gitignore will not prevent them from being added. This means, if the files were tracked before, they will continue to be tracked, to stop tracking a file you need to remove it from the index, you can achieve this with the command:
git rm --cached <file>
The removal of the file from the head revision will happen on the next commit.
Let us know if that's what you meant :)
Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events