How To Re-Locate Working Copy In SourceTree - xcode

I have a repository added to SourceTree. When I commit a change to the remote repository through XCode I see the change get committed remotely but my working copy doesn't get updated in SourceTree app. I have to rebase the changes to master in SourceTree. This is because my working copy folder is set to the wrong location in SourceTree.
How can I change the location of the local working copy folder in SourceTree?

The easiest way is to move your old Working Copy (rename the folder).
When you start SourceTree next time, SourceTree wants you to set the new "Working Copy" folder of the repository.
https://answers.atlassian.com/questions/43326/change-working-copy-location

Another way is to adjust the entry in sourcetree's bookmarks xml file
%localappdata%\Atlassian\SourceTree\bookmarks.xml
e.g.
C:\Users\Qwerty\AppData\Local\Atlassian\SourceTree

Related

Visual Studio new Project with wrong git repository

When I create a new project, I connect it with the git source from another existing project, this one is totally new and I don't know why it takes the sources control from the other ones without asking or anything.
For example, I have my project "A" on my computer, connected with git, today I tried to create project "B", and from the beginning, it connects with the git from the project "A", and says that I have tons of changes.
How could I avoid that o change it?
You can delete the .git folder or you can simply change the repository URL as below
Changing a remote repository's URL
The git remote set-url command changes an existing remote repository URL.
git remote set-url origin https://github.com/USERNAME/REPOSITORY.git
Looks like there's a .git folder in your new project directory. Try deleting that and it should work when you connect it again.
I had the same issue and I know how to solve it. For some reason, VSC (Visual Studio Code) has the wrong path for the git folder.
How to fix it:
1.
When you hover your mouse here:
you will see that path (mine pointed to the whole desktop). Delete it in explorer.
2.
In my case, that was all I needed to do. After that VSC found a proper git file.

When I try to drag and drop a folder which contains a git repository (which is a submodule at the moment) it says "Can't drop folder here..."

In the git-windows-interface when I drag and drop a repository it says: "Can't drop folder, You can only drop one folder without git repository with the app at this time. Dropping a single folder will allow you create a new Git repository in that location...".
How should I add a git repository to the git-windows-interface?
thanks
You can try and make GitHub for Windows detect your repo, by modifying the local path(s) it scans.
That would avoid trying that "drag and drop feature" which might not work in your case (being a submodule, which is by nature a nested git repo).
If it isn't possible to change that path, at least try and copy that repo in %HOME%\My Documents (HOME being set by the portable git within GitHub for Windows, C:\User\login on W7+, C:\Document and Settings\Login on WXp).
Then a local scan will detect it.
I was getting the same error. I had been trying to drag in the hidden .Git folder. Instead, drag in the folder above, which contains the .Git folder.
This worked for me:
Rename the ".git" folder to ".git_back"
Create a new git repo in the same folder so the new ".git" folder is in the same folder as the old one.
Close github for windows, delete the new .git folder and rename the old one back to ".git"
Open github for windows again, and it will see the old ".git" folder.

change svn working copy to another directory

Q: So I have local svn setup on my mac. I want to change to working copy of a repository to another folder without 'svn checkout', so that I can commit some code that is not currently in the working copy.
Problem with 'svn checkout'
The reason I don't want to use 'svn checkout' is b/c I don't want to overwrite the code into the new folder designated for working copy, because when I move the new code into the new designated folder and do an svn commit, I get an error based on the .svn hidden folders that svn attaches to your committed code.
What I am trying to accomplish?
I got myself into this mess, b/c I am trying to add multiple versions of my code into different folders, so that I can compare them against one another.
Thanks, Jon
You can use "svn copy" to copy one or more files in a working copy or in the repository.
More details: http://www.visualsvn.com/support/svnbook/ref/svn/c/copy/
I hope it helps.
When you do a svn checkout, it does not delete and overwrite existing files - it merges them (try it - make a backup copy of your target directory and then svn checkout into it).
However, the simplest way is to svn checkout into a clean directory, then copy your files on top of the checkout. Rename your current directory to something else if you need to keep the directory name for your checkout.

How to point gitbox/git to different local directory

Hi guys I have a remote repository cloned locally, Because my new changes have saved it to a different directory (workspaces in eclipse) I want to point git to the workspace directory rather than the other directory, how do I do this? Gitbox doesn't seem to have any options, and I can't see the .git folder
In your WORKSPACE do
git init
and then from where you pulled your copy initially. Do
git pull /path/to/your/workspace/project/dir

How would you avoid "Xcode, Subversion Error: 155007 (Path is not a working copy directory)"?

I am not able to see the commit option after I make changes to my working copy, but I ensured that my settings for svn were correct.
What exactly is the problem with this error message?
Xcode is showing:
Your path is not a working copy
What should I do to resolve this?
The blog post "Xcode, Subversion Error: 155007 (Path is not a working copy directory)" and its comment are pretty much the reference on this kind of error.
Simple Workaround:
Delete your local copy (cd myxcodeproject; rm -rf .)
Delete the “build” folder from the server
svn co https://svnserver/path/trunk/project .
Now you should see .svn folders in every directory of your local project (you don’t see them if you use the “Export” function of the SCM panel from Xcode).
At this point, you should be able to edit and commit your changes directly from Xcode.
Now you need to initialize correctly the project.
The following sections illustrate that part:
How to do it right (general principle)
To place the project under Xcode, you need to first import it.
The SCM->commit entire project… gives error 155007 if you don’t first do this:
Under the SCM menu in Xcode select Repositories, then click the IMPORT icon at the top of that dialog that appears.
Select the project from the list and then click the import button.
Of course you need to first configure at least one repository before doing the steps above.
Right Initialization steps (detailed process)
Create the project in XCODE.
Setup subversion in XCODE and select the subversion repository for this project.
Use Xcode SCM > Repository and click on the IMPORT icon. This will move the local copy to the subversion repository.
Now delete your local copy (or move it to another location just in case).
Finally CHECKOUT the project from subversion (this will create the subversion .svn folders, …).
Reselect the subversion repository for this project.
Commit the entire project.

Resources