Local Client server Git setup for Xcode projects - xcode

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.

Related

Using GIT in Plesk for a laravel project

I currently have a web application installed on my 'domain.com'. My server makes use of Plesk. What I then did was copy my app on a subdomain called 'test.domain.com' The second one is what I use for development work and once I have coded and tested, I manually copy the files across to the folders in the 'domain.com' project.
It is a very tedious process and I sometimes loose track of changes. My background is electronics engineering where I did some embedded programming in C. I am familiar with SVN version control and I am aware how version control can make my life easier.
Does anyone know what I can do to implement GIT or other alternatives to simplify my development process?
You can link a git repo on Plesk, and also you can choose the branch you want to pull too.
Link the master to branch to your domain.com root directory and another one like "develop" on you test.domain.com.
Plesk will give you a webhook link you can add on your git repo to auto-pull when you pushed.
You can add some after pull command on plesk, like a schema update for your laravel project too.

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.

Xcode 7 How to Configure a Git Network Repository

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/

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.

Securing Git server on windows?

Using msysgit and copssh, is it possible to secure the ssh part such that it can only access the relevant git executables and also be constrained to access only one folder?
I have a feeling that a git server on windows will be very much more open than a svn server like visual svn. I'm hoping to be proved wrong.
I would use a Linux server for your central Git repository. Install gitolite. This will enable you to administer branch rights etc.
UPDATE:
As per your recent comments, just go with unfuddle and be done with it in 1 minute. If you're concerned about using up the 500MB of space they give, large non-private artifacts can be stored as a submodule that can be hosted on github.
hope this helps!
On Windows, I have found Apache and Smart Http ( git-http backend ) to be the best way to host a Git server.
https://web.archive.org/web/20100308035130/http://progit.org/2010/03/04/smart-http.html
And coming to access control, I would advice you to keep it simple and have an access conf file svn or even gitolite / gitosis and write simple hooks in the Git repo ( in Python, Ruby, etc. )
The hooks will provide you pretty good control to the Git repo. You can control checkins per branch, checkins to particular folders etc.
Have a look at the git hooks man page. pre-receive or update are the hooks that you can make use of for this purpose.
Look at this awesome chapter from Pro Git on how to use Git hooks on the server side to enforce policy - https://git-scm.com/book/en/v2/Customizing-Git-An-Example-Git-Enforced-Policy
You can easily adjust them and add functionality to suit your purpose.
I would very much recommend using one of the Git-HTTP projects.
See my answer at: https://serverfault.com/questions/58425/setting-up-git-repository-on-remote-windows-server/163065#163065
You're trying to make Windows behave like UNIX.
Better go with the flow, and use a .NET based solution as Git server backend.
When you have the deal with a small 2-person project (as you mentioned in the comments), you can also host the git repository on a Windows network share. It just works, and you clone the UNC path (or mapped drive letter) in your git client.
For UNC paths, when you use slashes instead of backslashes (i.e. //server01/git/myrepos.git).
An alternative might be to use https://github.com/jakubgarfield/Bonobo-Git-Server/wiki
When I started looking at setting up a corporate git service, we have the following requirements:
1. Manage git repositories as projects, where we can provide self-service access control at project level.
2. LDAP login integration
3. Low administrative effort
I evaluated vanilla git, git + git-http, gitolite. These solution would require an admin person to manage the access control. If the team is big, this will be a significant effort. If the team is small (5-10 developers), vanilla git is ok.
I looked at github enterprise, use github, and later bitbucket. We eventually bought bitbucket and have a on-prem version up and running. bitbucket meets all our requirements. In addition, we can selectively sync some of the AD group to bitbucket and manage access at group level.

Resources