Is there a setting with git to allow a clone to use http on one OS and ssh on another? - windows

Short Question
Is there a setting with git to allow a clone to use http on one OS and ssh on another? For an exact usage: Is possible to use http protocol (cloned in Windows) on Mac OS X terminal which typically uses SSH connections
Background
I have a Macbook Pro that I dual boot with Mac OS X and Windows 7. I have a shared express-34 card that I store all of my repositories / working directories on. I use this so I can work from the Mac side or Windows side seamlessly (until now). At this point, I am unable to commit / update any changes from repositories I clone / checkout from Windows. It's worth noting that git repos that I clone from Mac, work fine in Windows, just not the other way around.
System Information
Windows 7:
Tortoise git and Tortoise SVN
OS X:
homebrew installed git and SVN
Update
I am now sharing a single SSH checkout (at the project level) on both Mac OS X Lion and Windows 7. This is working when I am booted natively into Win 7 as well as when it is virtualized inside of Lion.

If I understand what you're asking I don't think this is possible using the same remote name. A particular remote is always defined by a URL which specifies the protocol. However you can add a new remote with a different URL which species a different protocol.
A problem with doing this is that you'll have the same remote with two different names in the same repository. This means that all remote branches (origin/master etc.) will be duplicated and will get out of sync which will cause problems with any git behavior that depends on branch names instead of SHA hashes.
For example, suppose you have a remote named 'windows' that specifies http and a remote name 'mac' which specifies ssh. Suppose your repository gets behind your remote you update in OSX using git fetch/merge now mac/master is up to date but windows/master is not. This may not be a big deal to you but it does mean tracking branches and other branch name dependent behavior may not work as you expect.

Related

Git installation in USB Drive that works in both OSX and windows?

I work with git in my laptop computer (a mac) but sometimes have to use my code in a desktop machine (windows) to which I have no administrator access and which is also not connected to the internet due to security reasons.
I want to use git in that machine as well, but the IT personnel at my workplace has told me that it is not possible to install it in that particular computer room.
I have seen this thread about portable GIT (How to install Github on USB Drive?), but it seems to work only on Windows. Is there any way to make it work in both windows and mac?
I have seen threads here about how to use USB as a portable repository by starting a bare repo and cloning the contents to the other machine. I have also thought about cloning that same repo to the USB from my remote. All these solutions are not feasible because that desktop machine I want to work with has no git installed and I can't commit or do any git operation when there.
Is there any way I can have a git installation in my USB and have it working both in my laptop and in that work desktop? Can it work between two different OSs (Mac and Windows)?
Thank you for your appreciation.
Use a normal git repo on the usb drive.
Use UTF-8 as encoding for all the files to make sure that you won't get any problems with that
Before you go to your windows machine, make sure that you have checked out the branch that you want to work on.
Use the checked out files and work with them.
Back at your mac, you can commit and push and do whatever you like.
OR
Use your smartphone as usb drive. If you have Android, you can install botbrew on it and use git on your mobile. With that you can do your git operations while at your windows pc.

Subversion client for Diff/Compare (Mac)

I'm looking for a (free) subversion client that gives a complete DIFF/Compare between two revisions. Xcode's Source Control comparison tool only compares one file at a time, and doesn't give you a list of files updated between two revisions.
I tried to use svnX, but i'm unable to configure it with my local repository using:
svn+ssh://username#server-machine.local/Users/Path/subversion/ProjectName/
Any suggestions regarding an appropriate subversion client, and/or how to make svnX to work?
The best tool that I have found is subclipse. It is an add on for eclipse but you can use it to manage your repository as well.
Collabnet also offers a product called Collabnet Destktop that includes the subclipse client.
One major caveat is that you have to install the JavaHL library. Make sure to read the OS specific directions!
You might have to play with it a bit but the repository browser is very powerful.
I use svnX in Mac OS 10.7.5, You can download svnX for Max OS X here.
There are some server they provide free/private Space for subversion. I used this free/private space from Assembla
Here is screenShot that shows how to setup svnX in Mac OS X.
In working copy you can see difference in revision. svnX uses fileMerge to show difference. Its one of the best subversion client for mac os x.

How can I share a local Subversion repository between a Mac workstation and a Windows virtual machine?

I would like to share a Subversion repository between my main computer running OS X Lion and a virtual machine running Windows 7 hosted in this computer (via VMware). I am unsure what is the best way to go about this.
I am thinking of setting up Apache and Subversion server on the OS X side and hopefully that would allow my virtual to access the repository from the Windows virtual using something like Tortoise SVN and accessing the repository at http://macHostName/pathToRepository. This seems feasible since the OS X side is always running.
An alternative could be setting up Apache and Subversion on the Windows virtual, which would require me to run the virtual everytime I want to access the repository from the OS X side. Perhaps Subversion can be set up in IIS? That would save some time if I don't need to install Apache.
Either way, I am unsure of the best way to go about this set up and what the caveats of each option are. I also haven't found a good walkthrough that will show how to set up a Subversion server on any OS using Apache.
Then, there is also the option of using svnserve, which I am unfamiliar with. Will a repository not served by an HTTP server like Apache be accessible for whoever is not serving it from the OS X host and the Windows virtual?
Any pointers will be appreciated.
Both Apache and svnserve are using network protocols, so the basic network setup between your host and your guest regarding routing and firewalls will be the same.
If you already have Apache installed and are familiar to it, I recommend to use it. Otherwise my recommendation is svnserve, because it is much simpler to setup and configure. The SVN-Book has a chapter for setting up svnserve both in Windows and in OSX.

Different place here can svn checkout, but there can't

the same code With two Mac, when at home, I can checkout the code from the svn server successfully, but when I in my office it can't be checked. And the warning message is: svn: Can't read from connection: Operation timed out
The operating system is Mac OS X Lion on both
Which protocol do u use to connect to your repository? It may happen if your firewall at your office do something with the port used by your protocol.

Mercurial central repository LAN ghost folder?

I'm working on setting up version control on a company LAN using the setup described in this tutorial
The central repository is located on a Mac OS, with the developers running either Windows or Mac OS. Pushing and pulling from the central repository to a local repository on both Windows and Mac OS works.
What I can't understand is that the central repository folder appears duplicated in Windows Explorer ('CentralRepo' and 'CentralRepo-1'), yet when logged in as admin on the Mac OS hosting the central repository, this folder cannot be located. The duplicated folder can only be seen on one particular Windows computer.
Is it a temp folder? Is there anything that can be done to remove this duplicated folder?
I don't think this has anything to do with Mercurial. It's just some Windows or Samba screwiness. Because of the nature of a DVCS, you should never need to use Explorer to view the remote repo, so just ignore it.

Resources