is there any way to clone my mercurial repository to a separate machine ? (might be a silly question, but i'm pretty new to mercurial )
i want to clone the whole repository from a CentOS machine to an Ubuntu machine for some testing and i don't want to mess anything up on my working machine
If you have SSH access, can go
tar c '/path/to/your/repository' | ssh username#somemachine 'tar x'
That will get the repository and the current working directory over there.
Of Course, Go to the the Ubuntu Machine, install Mercurial, and clone your repository in the CentOs Machine from the Ubuntu machine.
Now you have a clone repository from the CentOS in another Machine, make your changes in the Ubuntu Machine, if you agreed with the changes, then push the Changes to remote repository(CentOs Machine).
Related
I have bare repo on my windows machine C:/Users/Public/Git_Server/test-repo.git
I can git clone in to my working dir on my windows machine using git clone C:/Users/Public/Git_Server/test-repo.git but I also want to be able to clone it to raspberry pi which is on my local network.
I can ssh to my rpi and try git clone //PCNAME/Git_Server/test-repo.git (\\PCNAME\Git_Server is a shared network path) but it's gives me an error:
fatal: repository '//PCNAME/Git_Server/test-repo.git' does not exist
I browsed all stackoverflow but couldn't find any solution.
I have a git repository installed in a remote Linux server, but would like to work on it and sync my changes to the git repository using Visual Studio Community Edition 2017.
Apologies if this is a repeat question; am new to this and have looked at the existing answers on SO but don't seem to have found a direct answer for this.
I have managed to use Team Explorer to connect directly to github, but would prefer to connect to the git repository on the Linux server instead.
Thank you.
Let's say you have a user on the linux machine, with a projects subfolder in your home directory, and under that you have a git project in a folder called myproject.
You should be able to run git clone username#server:projects/myproject at any remote terminal (including windows with git installed), assuming you have an ssh server enabled on the linux server above (you may have to install openssh-server first).
I am sharing my repository between my linux and windows machine and pushed some permission changes on my linux machine.
Now my windows machine says I'm up-to-date when doing this:
git fetch -all
git reset --hard origin/master
git pull
yet when I attempt to do the following:
git checkout dev
It suddenly tells me I have local changes, which just so happen to be the same files of which I modified the permissions on my linux machine.
What is the right way of dealing with this? I made those permission changes so I don't have to manually use chmod every time I pull on my linux machine.
Try setting core.fileMode to false on Windows, then the executable bit is ignored for the windows repo.
I have a windows machine and a raspberry pi, each with a git repo.
I was able to set it up so I can pull from the pi to windows with the following command:
git remote add pi#192.168.3.101:/home/pi/code/
This should be stable since the pi is set to a static local IP. I'd like help with an equivalent command to run on the pi so I can pull from the windows machine to the pi given that the windows machine is not set to a static ip (maybe using the machine name?). I'm still learning the ropes when it comes to windows/linux interaction and nothing I googled seemed to turn up what I was looking for.
I don't want to put the code up on github, so please don't suggest that.
And I want to be able to develop on either machine so that means neither repo can be setup as bare. I appreciate any help!
You could install an ssh server on the Windows machine, or a Git repository service.
But it's not a normal use of Git to have repositories pushing to each other. Don't do it.
The normal use is to designate one central location that all remote repositories push to and pull from.
That central location could be your raspberry pi.
However, the repository to push to should be a so-called bare repository.
I'm guessing that the location /home/pi/code is a working tree, not a bare repository. I suggest to create a bare repository on the raspberry pi, to be used by both the workspace on raspberry pi, and the workspace in windows. Here's one way to do it.
Create a bare repository in /home/pi/repos/code.git (or wherever you like) by cloning from /home/pi/code:
git clone --bare /home/pi/code /home/pi/repos/code.git
Add this bare repository as the remote in both the working tree on raspberry by and on windows using the git remote command.
I have a set-up where I have a remote git server, a local git/development machine running Linux, and a Windows development machine.
I generally use putty from windows to log into my local linux development machine, which is where my local git repository resides, as well as where I do my compiling, etc.
I'd like to use a (gui) git client on my windows development machine to manage this git repo, particularly for visualizing branches, etc, since my linux machine is mostly headless.
It it possible to control it using a windows git client via SSH, so that I can use windows to manage my local git repository on my linux dev machine? I don't want to have a repo on both my windows and linux dev machines, and I don't want to go through a two-stage push process.
My other option I suppose is to add my linux machine as a network drive under windows and connect that way, but it's awfully slow.
(And if anyone has any recommendations for which windows client is good and can do this, please let me know. I'd like to use SourceTree, but I don't think it's capable of this)
Thanks!