SVN: Create patch from specific revision to head - windows

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.

Related

R studio can't find GIT repository on UNC drive, but I can GIT BASH there

I've got a git repository (an R studio project) on a drive (\ds\folder...) that worked fine. However, the admin of the hospital I work at updated my Windows version, and now when I open the project I see this in the terminal:
You can see that my repository is located on a network drive.
In Windows I'm able to just go to the directory of the project/repository, and Git Bash there, which gives me the following Bash terminal:
How can I get R Studio to also change the directory to the drive that my project is on? I've read on some solutions that involve mapping a local drive to the network drive, which I thought were hard to follow. I'm really not looking for a solution that would require me to do that manually every time I use the repository, because I do that daily.
Thanks.

Need to Restore Desktop Files - Accidentally Deleted Desktop Directory Using Git Bash

I am new to Git and I did something silly.
I forked a repository from GitHub, then cloned it onto my computer using Git Bash. Long story short, I wanted the directory to be on my desktop but for some reason, I used rm -r Desktop and now all of my desktop files are gone.
I then cloned the repo to my Desktop and it's the only thing I have on there. I tried closing Git Bash since I did not commit any changes but my files are still gone and I am unsure of what to do.
How can I recover my Desktop files? I did not commit or push or do anything of that nature so I'd assume the changes are still local. Thanks in advance for the help!
TestDisk is a tool for recovering files which have been deleted.
Install testdisk
nter testisk into the command line, and the utility will start.
Select your partition to search in.
Select quick search or deeper search.
testdisk will output which files have been recovered and then you can decide to recover or not.
A tutorial on testdisk at the following link,
https://www.journaldev.com/36700/how-to-install-testdisk-on-linux-and-recover-deleted-files

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

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.

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?

Are there any portable versions of Git for Mac OSX?

I'd like to be able to do some development work on public/borrowed computers (where I have no root privileges) and I've managed to get most of my tools working off of a USB stick but I still haven't found a Git solution.
The portable versions of Git that I have found are Windows-only. Do you know of any Mac alternatives?
EDIT: I've gotten a few suggestions to just copy my current installation of git from /usr/bin and put that on a USB drive. That's a great idea but I don't have a current installation of git to copy from. I won't have my own computer back for a couple of weeks.
Would you happen to know where I could grab a pre-compiled version of git for OSX? I don't have access to homebrew or... anything really. Ideally I could just grab a zip file from somewhere and dump it on my USB stick.
I've managed to put together a solution based on ideas from several different people (thanks to all of you):
Download the Git binary for Mac OSX from git-scm.com. The downloaded DMG contains a PKG file.
Unpack the PKG file with unpkg or something similar. (This step is necessary because normally PKG files can only be installed with root privileges.)
Drop the etc and git folders that were just unpacked onto your USB stick.
Now, whenever you plug in your USB stick, just make sure to put the location of the git directory on your PATH (like this: export PATH=$PATH:/path/to/git/on/usb/stick) and you'll be good to go!
NOTE: I've tested many of the git commands using this method and most seem to work without any issues. However, git init will complain like this: warning: templates not found /usr/local/git/share/git-core/templates. Not surprising since the templates are actually on your USB stick and not /usr/local. Despite this warning my repos seem to be working just fine.
Add a environmental variable GIT_TEMPLATE_DIR
to quote the documentation
The template directory contains files and directories that will be
copied to the $GIT_DIR after it is created.
The template directory will be one of the following (in order):
the argument given with the --template option;
the contents of the $GIT_TEMPLATE_DIR environment variable;
the init.templatedir configuration variable; or
the default template directory: /usr/share/git-core/templates.
I've uploaded my /usr/bin/git and /usr/bin/git-shell to
http://www.club.cc.cmu.edu/~ajo/disseminate/git
http://www.club.cc.cmu.edu/~ajo/disseminate/git-shell
You can try those, but I have no idea if this approach is likely to work. (There are no interesting shared-library dependencies reported by otool -L, but I don't know what else might theoretically go wrong with the idea.)
FWIW, I use Mac OS X 10.8.2 and git version 1.7.10.2 (Apple Git-33).
Not sure if this is appropriate as an "answer", since I don't plan to leave those links working indefinitely. Maybe I (or someone) can delete this answer in a month or two.
Apple's command line tools for developers include git, I believe. You can find them on http://developer.apple.com/; you might need a free developer account. They package will want to install to /usr/bin etc., but you should be able to use pax to extract the contents wherever you want.

Resources