Unicode filenames not preserved on windows when downloading zip of gitlab repo - windows

I have a Gitlab repo where one of my files is named "инит.ћ". I created the repo on a Linux machine, and now I'm trying to download it from the Gitlab webpage onto a Windows machine.
This results in that specific filename getting mojibake'd into "-+-+-+-é.-¢".
When I use git to clone the repo, this doesn't happen, and the filename is preserved. And when I download the zip file on Linux, the filename is still preserved.
Is there any way to remedy this. I'm not even slightly familiar with how windows deals with filenames. So I don't think I can give much more useful info than that.

Related

Issue with Windows and Git with illegal filenames [duplicate]

This question already has answers here:
how do I clone files with colons in the filename
(4 answers)
Closed 7 years ago.
So, I'm working on a component to my company's project in which we are using git as our version control. After I finished my task on the project, I needed to send my code in for review.
The problem is, I'm working on a Windows machine with perl files names on the remote git branch that something similar to "filename::123.pm". So what Windows does when I checkout this branch is just delete them from my local branch, and all file names with a :: in them are gone. Since these are important files, this is an issue for my additions on the local branch and cannot be merged since then the important perl files are gone.
How do I avoid this?
I wanted to try something like ignore the specific files for a git clone of the repo, so when I checkout they are ignored anyways and not removed, but this is impossible. Another thing I wanted to do was clone on a VM running linux and work from there to do commits. Well the cloning is super slow, and that isn't an option either.
What is my best option for working with this repo where the filenames are invalid for a Windows machine to read? And no, renaming the files isn't going to work since so there is so much more work to be done if we did that.
Surely you must use git sparse-checkout feature that permit to checkout only some directories and in your case ignore directories with not supported files.
Example :
http://jasonkarns.com/blog/subdirectory-checkouts-with-git-sparse-checkout/

How to use the same repo on external FAT drive on OSX and Windows?

I have to work on the same project in multiple systems for some reason. So I took external drive with FAT filesystem and copied my repo from OSX to the external drive. Now I want to be able to use GIT to work on that project from both systems OSX and Windows. But first I have problems with file permissions as FAT does not have permissions, the file permissions were changed when I was doing diff on both platforms. This was easily solved when I set:
git config core.fileMode false
But I cannot solve problems with symbolic links. I need them to be unchanged as I don't need them on Windows. As far as FAT does not support symbolic links, when I copied files form Mac to external FAT HDD something is changed in those files. Now I get diff only in Windows related to symbolic links. But I don't get any diff on OSX. How this can be? Symbolic link is also a file right? Now I don't understand the file is changed or no? Systems tell me different things? How to solve this problem?
Tries using this:
git config --global core.symlink false
but it didn't help, as, I guess, if works when you checkout. But I have only one repo and I don't do checkout to use it on Windows. I just use it from my external HDD.
The correct way to handle symlinks in git between multiple systems is to use it the way it was designed to be used, which is to have multiple clones and push and pull between them. So you'd have your original clone on the external disk, and one clone on each computer. When you push-pull between them, git will update the symlinks: How does git handle symbolic links?

SVN: Create patch from specific revision to head

I have a computer that is offline from the network, but shares some svn directories with computers that are on the network.
About once a month I need to update the directories on the offline computer with the changes that have happened in the repos. The current way I do this is to zip the directories, burn on cd and unzip on the offline computer.
I thought there must be an easier way to do this, so I thought of getting all the files that were changed from the last time and only zip those. But then I would miss out on changing deleted files.
So I there a way to create a patch from a revision to head? I've searched but haven't found anything useful.
Both computers run win7.
If you know the revision of the last change, you could run a
svn diff -r revision:HEAD
to get the list of changes on all files.
You could add --summarize to get a list of files alone (without the actual diffs)
svn diff --summarize -r revision:HEAD
which could then be piped into a zip command to just get the files that were changed.
Refer SVNBook
If the repository isn't too large and can fit entirely on an USB stick / CD, you can do this:
Create a copy of the repo on the USB stick / CD.
Plug the USB stick in the offline computer, and svn checkout the files straight out of the repo on the USB stick, using the file:/// schema (documentation).
Monthly, do the same process again, only instead of checking out from the USB repo, simply plug the USB stick and run svn update. If you've copied the latest version of the repo in the same directory on the USB stick, the update should run just fine.

How do I access a git repo on a windows share?

I want to be able to sync a work repo from my Windows 7 desktop to my Windows 7 laptop without pushing my commits to our main server. How do I do this? I can't figure out how to set up a remote path so that git can understand where it is. I generally use Git Bash for dealing with git, not the windows commandline, so the issue here is likely that I can't figure out how to write a path in Git Bash which will reference a windows share.
So, say I have a repo at (windows share path):
\\\\MyWorkPCName\dev\myrepo\
And in the command line, I can access the directories and files (albeit using pushd since cmd is stupid), how do I convert this in to a valid git remote?
While Git doesn't recognize backslashes, Windows does recognize forward slashes:
git remote add desktop //MyWorkPCName/dev/myrepo
Git Bash also lets you access windows drives using UNIX-style paths, e.g. C:\Users\bug\repo becomes /c/Users/bug/repo.

How can I deal with a git repo containing symlinks on windows

As part of our code repository, we have a symlink which is internal to the working tree.
Zend -> ZendFramework1.10/library/Zend
This works fine for all the developers running Linux or OS X, but we're now getting some people trying to use the repository on Windows.
The functionality of the symlink can be replicated by deleting the link git creates, and using mklink to create the equivalent directory junction.
However, git now sees this as the deletion of the symbolic link, and the addition of a proper directory.
I'm looking for a way to have the two co-exist, is there a way to tell the Windows machines to ignore the Zend directory, even though it's technically versioned. If this breaks when the files in that directory change then so be it, but it'd be nice to be able to work with the rest of the repo without having to worry about the link.
You can use git-update-index to tell git to ignore changes to the file:
git update-index --assume-unchanged Zend
You could probably use cygwin on the machines running windows.
As Magnus Skog has suggested, git under cygwin copes correctly with the symlinks. I switched away from Git for Windows for this reason alone. However you need to weigh up this advantage against the overhead of setting up the cygwin environment for your Windows users (particularly for those unfamiliar with *nix and the command line; for example there are a number of outstanding issues when trying to use Cygwin and TortoiseGit.)

Resources