I have a large VS2017 solution that is stored on GitHub. In my local working copy of the repository, there are several files that are marked with the ? icon overlay which indicates that they are non-versioned files. However, these files are in the repository and are up to date. If I commit changes to other files, these files do not show up in the No Versioned list or if I create a clone of the repository from GitHub, these files have the proper icon overlay.
Any ideas why these files are shown as Not Versioned in one local repository and not another?
Please make sure that the case of the filename on the filesystem match the casing in the repository.
Background
Even if Windows ignores the case in paths, Git does not (completely) - even if you enable core.ignorecase. git status indeed does ignore the case, however, if you try to get the log on a file with a different casing, the log will be empty.
Because of this in TortoiseGit 2.4.0 the icon overlays were made case sensitive. So if the overlay icon shows that the file is versioned, the log won't be empty and if the file is shown as unversioned you get an indication that something is curious.
How to fix
Rename the files in the filesystem (some applications might tend to delete and re-create the files with different casing) OR use the TortoiseGit rename function to fix the casing in the repository.
Since TortoiseGit 2.5.0 you can configure TortoiseGit to ignore the case when calculating the overlay icons again by enabling the advanced option OverlaysCaseSensitive (cf. issue #2980).
Related
My project had several folders that accidentally got added to my GitHub repository. I could delete them (one file at a time) from the GitHub website but that is tedious for a large number of files. I tried using git on the command line but it was conflicting with the Xcode source control updates. I would just like to do it graphically in Xcode if possible.
The closest Xcode question that I could find was this one, but it was about removing source control altogether, which I don't want to do.
I struggled with this for quite some time but it turned out to be fairly easy. I am sharing my answer below.
As long as you have your project already connected to a remote GitHub repository, all you have to do is use Finder to delete the files or folders.
Then go to Source Control and choose Commit and after that Push.
This will delete the files from your GitHub repository without you having to use the command line.
I use Mercurial (from Tortoise HG) on Windows as a Single User, Single Machine Version Control system. I had the directories of all my repositories backed up.
On a new machine, I copied back the directories. I also installed THG. THG doesn't seem to recognise the directories as repositories on it's own. i.e. in Explorer I don't see the checked out/committed icons on the file names. If I right click on a file, and go to the THG options, it does show me revision history etc. When I do open Repository on THG and point it to the directories, it does again show info.
How do I make it see the dir as a repository from Windows Explorer.
Also I haven't yet tried changing files, committing etc, no idea if it would work.
Seems like your only 'problem' is that you don't see the overlay icons in the Windows explorer shell. Otherwise everything's ok.
You can try to simply close/reopen explorer. If that doesn't work, a system restart will do in any case.
I have a SVN source controlled project which contains some generation scripts that require changes so they apply to the particular machine. However, I don't want to ever check these files back in. Is there some sort of client side ignore mechanism available in the AnkhSVN client that will prevent me from accidentally checking in these changes?
I tried using some different terms and finally ran across this article:
http://agilemusings.blogspot.com/2008/12/tortoisesvn-ignore-on-commit.html
Adding files to the ignore-on-commit changelist affects all clients so regardless of how you make this change it will apply to both Tortoise and AnkhSVN. Also, this doesn't have any effects on the repo itself so you won't be stepping on any toes if someone else on the project does need to make alterations to these files.
I usually recommend to not-check in these files that are changed locally. You can create a template file instead. You can then customize the buildscript to copy the file in the right place if it is not already there.
Then you can just the svn:ignore setting (Right click Subversion->Ignore->... on an unversioned file), to make sure the file is not accidentally added.
When committing changes to GIT repo, i see constant updates coming from the xcuserstate files.
What are those?
xcuserstate files are generated from within Xcode and saved in your project bundle to remember your last opened file, the open state of any group folders, open tabs, and any other user setting your project might need to remember. For purposes of revision control, you should ignore them or leave them out if at all possible.
I'm using Mercurial 1.7.2. on Windows and I want to extract all files within a specified change set (in my case tip). This is so I can upload only the files that I have changed to my web server.
If I want to take an un-versioned copy of the entire repo then I use hg arhive however I can't find a way to get just the files in a changeset.
And all the examples I can find use Unix tools.
With hg status --change <revno> --no-status you get a list of the files that's changed.
You should be able to feed that list into robocopy or xcopy or something else.
If you're using TortoiseHg you can do this from the Repository Explorer - in fact I do exactly what you're trying to do for a Wordpress install.
thg log will bring up the log of the repository in TortoiseHg. You can then right-click on a changeset and select (from memory, sorry) Archive. There are a few options, but you should see an option on the resulting dialog something like "Archive only changed files". Make sure that is checked, and away you go.
The command that's executed is shown to you, but to automate it on the command-line you need to get the list of files changed (see Macke's reply). With a little batch-magic you can feed that into the Archive command.
Have a look at this StackOverflow question for details of how to do it on the command-line, providing you have a SED interpreter installed, which you can easily find for Windows.