sourcetree - Where are all the remote repository paths store? - atlassian-sourcetree

I want to delete some repositories to free up my disk space, but I want to backup the remote repository path for future use. I know that we can find the local repository's source path at: C:\Users\<username>\AppData\Local\Atlassian\SourceTree\bookmarks.xml, but I don't know sourcetree stores the remote repository path in which file.

Those would be in your local .git directory which holds the repo configuration.
You can see it listed with git remote show origin.

Related

Eclipse Workspace on a network folder (UNC path)

I am working on a project which has GitLab repository and the local repository is on a network folder so I wanted to create an Eclipse Workspace on that folder as one can share the project with the other team members but when I tried to build the project I got an error message which says that eclipse workspace can't be a UNC path, so my question is, is there any work-around way I can do this, for example is there any way I can let the OS (Windows 10) link a local folder to the one on the network so that every member would do the same and work on his own local folder and it will be automatically edited in the network folder?
Thanks
No, this is not possible since everyone needs their own cloned Git repository to work with.
For instance, switching the branch or staging files are per repository and would therefore affect everyone. When you clone a Git repository without the bare option, there will be a so-called working tree which is the location where the currently checked-out files are and this folder is not copied but mapped into your workspace. Everyone would not have a copy of those files but working with the same files.
Besides the editing conflicts you would have, another disadvantage of having a Git repository on a network drive is that it would be slower. Therefore one would not want to have this even if it were possible to have Eclipse projects on a network drive.
But since in most cases a Git repository including the working tree takes less disk space than in SVN the working copy of the same, it should not be a problem if everyone has a locally cloned Git repository.

How do I sync a (different named) directory with an existing github repo?

I want to modify a repo from two sources: windows OS and Ubuntu OS (Dual booting on a laptop). The repo contains files from my Arduino library directory (I'm using the repo as a place to keep changes to the library the same across OS).
Is it possible for me to get the content of the repo without having to rename the arduino library directory name (Arduino software looks for a folder called 'libraries' so I can't change its name).
When you clone a repo, git defaults to placing it inside a folder with the same name as the repo, but this is not required. You can name it whatever you want. So you likely want to run some git clone git#github.com:/your/repo libraries to get the repo content in that path.
You can also rename the repo folder after cloning if you already have it but need the path to be different on your system.
I'm not sure if you have everything in libraries checked in or not, but if you have only certain directories in git you might be able to keep the repo somewhere else on disk and symlink from libraries/library1 -> /path/to/your-repo/library1

How to backup and restore scm manager server?

I am having scm manager server i need to same setup and same code backup server.
so i am plaining to configured centos 6.3 server i was download it scm manager server. But how to backup old scm manager server full repository and full data, username and all.
Please help me.
If you want to take only repository backup, You can just write scripts to take backup of all repositories with simple steps.
Change the directory where you want to take backup of repos
git clone --mirror RepoURL
Restore -
change the directory where you have repo backup, if you are going to restore this repo in another server you need to change the origin url in config file
eg: Backup folder name is Backupmygitrepo.git, within this folder "config" will be available.
url = URLofNewOrigin
Execute below command for restore your repo-
git clone Backupmygitrepo.git restorereponame
This will restore repository with history.

Will deleting a local git repo affect the remote repo?

I did a git clone to my computer. After that I realized that I cloned the project to wrong directory. What I want to do now is delete the project folder from my computer and do a git clone to another directory.
If I just delete the folder, will it affect the remote repository?
Any other better way to do?
You can just move the directory to where you actually want it. Moving it, or deleting it, will not impact the remote repository.
You can delete the folder locally and clone it again to the directory you want to work in. Nothing will effect the remote repository. You also can just move the folder since there is no absolute path in the .git structure.

Is it safe for multiple users to use a Git repo on a shared network drive?

We're using Eclipse (with the eGit plugin) and I want to host a repo on a shared network drive that several users have write access to.
Can users all point at the same original repo (on the shared drive) or would it be better for each user to clone the repo to their local drive, work off this local version, and push changes to the networked original as required?
Eclipse seems to allow you to "import" (to your Eclipse workspace) a project from a Git repo, but that imported project doesn't seem to be monitored by Git until you choose to "Share project". At this step the working directory becomes that of the repo's working dir for that project. Presumably all users sharing this project would have the same working dir i.e. that of the repo on the shared drive.
I am not clear on the implications of this, but it doesn't seem like a good idea, on first inspection! How will it handle basic problems like 2 users trying to open the same file for editing simultaneously, for instance?
Thanks.
It's better that each person has their own repo.
Clone you current repository as a bare repo and place it on the network drive.
e.g.
git clone --bare /path/to/current/cool_project cool_project.git
Move the cool_project.git to your network drive, and get everyone to clone from that. Bare repos don't have a working directory, hence the name, so they are safe to push to.
See the chapter 4 of the Git Pro book - Git on a Server, and specifically chapter 4.2 for more details.
From the sound of it you are talking about each user pointing to the git repository over the network and not having individual git repositories on each developer's computers and then pushing to a 'central' repository. If I am correct in reading your question that is not a great way to take advantage of what git has to offer. Git is a distributed version control system so everyone should have their own repository and push the changes to a central repository that you do your CI builds off of.