I'm using Git-TF (bridge between Git and Team Foundation Version Control (tfvc))
git tf pull
downloads .vssscc, .vspscc files into the repository and commits. So if I use git push
next, it uploads those files into remote repository which is not desired behavior for me.
I was trying to make git tf pull
aware of .gitignore file. Based on this post I added following lines into the .gitconfig
[alias]
apply-gitignore = !git ls-files -ci --exclude-standard -z | xargs -0r git rm --cached
and called git apply-gitignore
. As far as my understanding, it removes files from repository (not physically, just awareness).
Next I had to ran git commit -a -m "TFS2Git"
and finally git push -u origin master --force
which worked fine and pushed the source into remote repository (GitHub) without unwanted files.
Next, I did some fake updates and pulled remote source into local repository and checked-in to TFS via git tf checkin
. Unfortunately it actually deleted unwanted files from the solution.
Is there a workaround to fix this issue?