Setting up SVN repository on Remote machine with XCode 4.0 - xcode

I have followed the documentation to setup the SVN repository for existing project. I followed following steps:
mkdir branches
mkdir tags
mkdir trunk
cp -R /myProject /SVN_Master/trunk
svnadmin create myProject_svn
svn import trunk/myProject file:///SVN_Master/myProejct_svn -m "Initial import"
It has set up SVN repository now. How can I checkout this? It isn't working when I try to checkout from XCode organizer, give path file:///SVN_Master/myProejct_svn. Am I missing something?
How could I setup the same thing for remote host(my server)? Can I just copy created local repository there and use that path?
Thanks.

Got this sorted. It was annoying though as Apple's documentation on this doesn't made any sense. The simple steps you should follow is,
Setup the SVN repository on remote Windows server. I used VisualSVN. I was able to setup in couple of minutes.
From MAC, checkout the code from terminal using "svn co http://serverurl/svn/projectname localdir" command.
Open the project.xcodeproj file and it will try to create repository for you automatically. Make sure that you enter correct user/pass when asked for.

Related

git checkout downloaded files on Windows 7

My network from work doesn't let me clone any repository via Windows Git tool by command line git clone therefore I just download the repository.
My problem now is, I need to checkout by git checkout ###### but I cannot figure out how I can do that on my Windows 7. I have installed GitBash tool and Git Desktop, but as I said my network doesn't allow me to do much.
Option 1: local clone
Making a local clone should be your easiest option: it does not involve clone anything from the web so your administrator rules might allow it.
I'll assume you downloaded the remote into workspace/downloaded-bare.git:
cd workspace
git clone downloaded-bare.git sandbox
now you should be ready to work in workspace/sandbox.
Option 2: turn the bare into a working sandbox
If the local clone does not work, you can do the equivalent steps manually:
mkdir sandbox
cp -ar downloaded-bare.git sandbox/.git
cd sandbox
git init
and again, sandbox is now ready for normal work.

warning: templates not found /usr/local/git/share/git-core/templates

I get this error warning: templates not found /usr/local/git/share/git-core/templates when I cloning repo in local repository this link, this link, and this link I tried this method and I just waiting more than 20 minutes but repo doesn't clone. I use source-tree and OS X El Capitan. How can I fix it?
Create a templates folder.
In your case, it should be: mkdir /usr/local/git/share/git-core/templates
I was also getting same error
warning: templates not found /usr/local/git/share/git-core/templates when I cloning repo in local repository then i found solution which solved my issue.
I Added the [init] section to .gitconfig in home directory, so that it looked at SourceTree's git templates directory when cloning a repo:
[init]
templatedir = /Applications/SourceTree.app/Contents/Resources/git_local/share/git-core/templates
Hope it will help you!.
In case of Source tree on macOS
Steps:
Source tree Menu
Preferences
Git
Click on System Git under Embedded Git Version 2.2.1
Reset to embedded Git
Restart source tree
Similar to Rohit's answer, I went into SourceTree's Tools->Options->Git and selected "Update Embedded Git". After the latest Embedded Git version was installed, the warning stopped occurring.
Cloning via SourceTree for Mac, the download was stuck at 99% and I was getting the same error:
warning: templates not found /usr/local/git/share/git-core/templates
I started looking up the issue and found this Question. Was about to start with some of the Answers here...
But then it finally completed. So, my Answer: wait a bit longer. Mine was cloning for 10 minutes or so.
#wonderfulthunk's comment works for me:
sudo mkdir -p /usr/local/git/share/git-core/templates && sudo chown -R my_username /usr/local/git
I followed below steps and I am able to get through this issue in Windows 10.
Step1:
First know the path of %USERPROFILE% using below command in command prompt.
echo %USERPROFILE%
Please note that, you can also run git config --list and look for init.templatedir for the path.
Step2:
Look for .git_template folder in it.
If is missing, please run below command to add it.
git config --global init.templatedir "%USERPROFILE%.git_template
Step3:
Create a folder namely templates in it.
After creating this templates folder, I did not get the warning mentioned i.e. 'templates not found' any more.
MacOS: Ventura 13.0 /
Sourcetree: 4.2.0
I fixed warning: templates not found /usr/local/git/share/git-core/templates by going to "Sourcetree preferences -> Git" and clicking to "Use System Git". There's no need to restart Sourcetree, just try to clone again.
I didn't switch to usage of embedded Git again, all works perfectly with usage of System Git.
In my case, this happened because an unaccesed project. Check that you have all the privileges to clone that repository.
If you use Sourcetree application, switch git version from "Embedded Git" to "System Git" in setting.
https://community.atlassian.com/t5/Bitbucket-questions/About-git-path-for-Sourcetree/qaq-p/186483
And after changing git version, if you still have problem with cloning, change protocol from "ssh" to "https".
I couldn't get past this problem. Even after getting rid of the 'templates not found' error by adding the usr/local/git... folder, the clone would still look like it was at 99% and sit there for HOURS. I just clone via command line and it's there in seconds, then I just add the local repo to Sourcetree instead.

Using SVN Checkout from terminal on MAC OSX 10.9

I apologize for the newbie question. When using svn checkout on a repository, that only copies the directories locally to my machine correct? I want to make sure I do not remove anything from the repository.
That's right, doing an svn checkout operation does not change anything on the remote repository.
Yes 'svn checkout' just download source code from repository to your pc. It doesn't modify any of respository. 'svn update' too.
But, 'svn commit' will change your repository.

Git Repository Created Manually Can't Commit

After creating a Git Repository using the terminal application using the following commands
Focusing the shell on the project directory
$ cd ~/Desktop/Myproject
Setting up the Git Repository
$ git init
Preparing the files for the "staging area"
$ git add .
Making my first commit
$ git commit -m 'Initial Checkin'
When I now try to commit in Xcode, I get
The operation could not be performed because no valid working copies were found.
Please verify that your files are under source control and try again.
But if I modify any of the project files and $ git status in to shell, it will tell me that what ever file I fiddled around with in Xcode has been modified and the I can commit from there. Why not in Xcode??
I had a loot at Can't commit changes to local git repository but the suggestions did not solve the problem.
If restarting XCode doesn't help, since you are saying it works fine through terminal, try adding it again in XCode.
go to Organzier--> Repositories --> Add Repository (bottom left corner)-->Set the correct values and local path to your project
my guess is, since you created the repository outside XCode, for some reason, its not detecting it right, or is not having the right permissions. Re-adding the repository through XCode may help solve this issue for you.
I had this happen once, and the issue was cleared by quitting and re-opening Xcode.

How do I setup git on Windows?

I am very new to the terminologies: git, repository and cloning.
I was able to search them all online and get pretty good grip on each (pretty simple stuff!).
But what I am trying to figure out now is how to "run" these instructions:
Clone repository for app:
git clone git://github.com/SampleLink.git
Update submodules:
git submodule update --init
I am running Windows7. I tried to run init through command prompt, but no luck.
Are these supposed to be run as individual commands or as one following the other in sequence automatically?
I am just not sure how to run these on my Windows machine and cannot seem to get any of it to work.
The submodule is a file within the initial repository.
I'm sorry if this is a lame question, but I have never needed to run this type of setup before.
I would recommend installing msysgit in its "Git for Windows" instance:
Git-1.7.3.1-preview20101002.exe
I like using Option 2, only adding the git\bin directory to the PATH environment variable, but without overriding some built-in windows tools.
From there, git clone over http should work.

Resources