Xcode 7 How to Configure a Git Network Repository - xcode

I am about to start developing an application in Xcode 7 and will be working on the code from different locations on different Macs. I want to configure a Git repository on my fileserver (Snow Leopard Server) where my code will reside, and will be regularly backed up from, so that I can 'check out' code to whichever Mac I am working on, work with it and 'check in' afterwards. Is this possible?
I am used to working in IntelliJ IDEA where I simply create a bare repository on my fileserver, create my new IntelliJ project on my local Mac and then 'push' my local code to my network repository when needed.
Many thanks.
Chris

You can have your own git server installed locally but its much better to use a service like bitbucket (private repo) or any other free git hosting service.
If you still decide to have it locally on your mac here are the instruction on ow to do it.
http://www.tomdalling.com/blog/software-processes/how-to-set-up-a-secure-git-server-at-home-osx/

Related

How to Add Xcode project to Github repository from windows environment

After seeing title of my question you might think like this kind of question is already been asked before. However this is not duplicate, read below to know.
I am developing IOS application. Whenever I get time I work on that every time I use either library's PC or friend's MacBook to developing or making changes in my existing project and then I compress the project and upload it to my Google drive.
I would like to add my Xcode project to Github. I know how to do it from MacBook though. I am looking for way to push my Xcode project from windows environment. As I am poor fellow and can not afford MacBook at the moment.
or
If is there any way I can push my project to same repo on Github from different MacBook every time. As I mentioned before I am using public library to work on my IOS app it is not possible that I can be able to use same Apple PC every time.
Make in windows console -
cd /path/to/my/repo
git remote add origin https://github.com/UserExample/ExampleProject
git push -u origin --all
There is a variety of ways to use GIT within Windows. Github is just a GIT repository cloud service. You can fetch, push, pull command line, after installing GIT on your Windows machine and then CD changing directory to your repository (where the source code is) on your Windows hard drive.
Since you are new to GIT and Github, use the very user friendly Github tool:
Github Desktop
You will be able to use use the existing repository on your Windows hard drive, or if it gets confusing via the Github Desktop to "connect" an existing local repository to the Github repository (https:www.github/myrep). Then just backup your working project to a backup folder and clone the Github repo you are using.

Local Client server Git setup for Xcode projects

I have a scenario, we are team of 5 iOS developers. Working on iMAC with OSX 10.8 and xCode version 4.5. Now i want to have Git Version control system during working on same Project.
I have read tutorials for Git but all have remote as online server like github.com or bitbucket. I want to create Local network Git server (Most probably my own iMAC) so that we can work on our local network.
Can anybody guide me how can i do that?
There is sparkleshare here http://sparkleshare.org/ which uses GIT under the hood.
How does it work?
SparkleShare creates a special folder on your computer in which projects are kept. All projects are automatically synced to their respective hosts (you can have multiple projects connected to different hosts) and to your team's SparkleShare folders when someone adds, removes or edits a file.
If you want to install your own private git server i found this useful http://blog.muehlbachler.org/2012/01/how-to-install-a-private-debian-git-server-using-gitolite-and-gitlabhq/
There could be plenty of results if you googled 'git private server'.
I hope that helped a bit.
Edit
There is also gitlab - http://gitlab.org/ which is a self hosted git management software.

Xcode project syncing over cloud service

I'm developing an iOS app on two different Macs. I have a local git repo setup in xcode. Every time I switch Macs, I download the most recent xcode project folder from my backup cloud service, SugarSync. SugarSync automatically uploads any changes I make to the project to the cloud.
Is this unstable, or just simply a bad practice? Is there a better way to build a project on multiple computers for only one developer?
I would suggest using github for something like this. You could push from one machine and pull from the other would would accomplish the same thing you are doing now.
BUT doing what you are doing now should still work, I've done the same with Dropbox in the past.

Howto add an existing VS project to Mercurial (using TortoiseHG or VirtualHG)

I am new to Mercurial / TortoiseHG / VirtualHG. After reading some tutorials I still fail to understand how it is supposed to work.
Could someone please explain in a few simple steps how I add an existing VS2010 project to Mercurial using TortoiseHG or VirtualHG, and how I go from there?
So after adding it to Mercurial, what do I need to do to start working on this project again? Years ago I have worked with Visual SourceSafe, so maybe this experience confuses me right now.
Also I'd like to know what to do when colleagues want to work on this project.
I see in the comments that you managed to get your source files under version control with:
$ hg init
# (setup .hgignore)
$ hg add
$ hg commit
Great! To share the project with your colleguages you need to make the repository accessible to them somehow. You have three options:
Filesystem access: This is the easiest if you already have a shared network drive setup. You put the repository on the shared drive where everybody can read and write. People make a clone from the drive back to their own machine and work on the files there. They commit there as well and finally use hg push to send their changes back to the repository on the shared drive.
Make sure that everybody uses version 2.0 or later with such a setup! There has been bugs in earlier versions of Mercurial that could cause repository corruption when pushing to a repository on a network drive.
HTTP server: You can use hg serve to start a built-in webserver in Mercurial. The server can be used to clone from. In a trusted environment you can start it as
$ hg serve --config "web.push_ssl=no" --config "web.allow_push=*"
to disable the default security settings and allow anybody to push new changes to the server.
For more heavy-duty use, we recommend setting up a "real" webserver and install the hgweb (Fast)CGI script that comes with Mercurial. See the Mercurial wiki for information on that.
SSH server: This is easy if you have an existing Unix setup where people have SSH login to a central server. You need to install Mercurial on the server and create a repository there that people have read and write access to. This is also covered in the wiki.

How do you set up github version control for a team of two?

We're trying to set up github version control for a Jsp-project in NetBeans 7.0.1. The problem is we don't have a clue what to do. I Have set up a public account on github and done all the steps in the install guide on github, ssh keys and everything. So if I wanted to work on my own in this project I wouldn't have a problem.
The problem is how to get my collaborator started. He has an account on github. he set it up with ssh keys and such. In the admin view on github I added him as a collaborator, but we don't know the next step.
So the question is how to connect the collaborator to the project? something like this I suppose?
git remote add origin git#github.com:username/Hello-World.git
git pull
(another question: Do I git only the source files or the whole project folder?)
Regarding your second question... That's a tough one.
A few months ago I was working with a colleague on a JavaEE project and we initially decided to share the whole Eclipse project. Since I was working on Windows and he was working on Linux, we had much trouble maintaining everything. Also we had to make sure that we don't accidentally push up our .project dir, because that would overwrite the settings on the other persons machine, messing up the whole project. So we ended up removing all the project files from the repository and just keeping the source folders (src and WebContent).
Both of us set up an empty project, made our settings and than imported the source code from the repository. Was some trouble setting it up until everybody had the same project settings, but afterwards it worked like a charm.
For just two developers that is fine, I guess for a bigger team, there might be better solutions.
So, I guess Netbeans handles the project settings in a similar way. So in my opinion you should just share the code.
For the first access, what your collaborator should be able to do is a git clone of your repository.
That will set for him the remote address.
If he is declared as a collaborator, he then should be able to push/pull to that remote repo.
Note that your collaborator should have received a push notification access.

Resources