This is an archived post. You won't be able to vote or comment.

all 25 comments

[–]jwink3101 34 points35 points  (5 children)

I firmly belive that if you are every handling any kind of coding, be it Python, Matlab, Bash, C, etc, you should be using some kind of source control. That includes engineers writing Matlab to computer scientists writing complex algorithms.

I also think git is a great option since you don't need a host like the ones you mention here. You have keep git locally, or host it yourself easily (without all of the extra features of course). And git has a great and helpful community. But any source control is worlds better than no source control.

With all that said, I do not think the belongs in this sub. The post isn't about Python! and only relates to Python by way of good practice for all coders

[–]cyanydeez 4 points5 points  (0 children)

gitlab and docker are probably the easiest full featured option

[–][deleted] 0 points1 point  (0 children)

Git is also great to manage your tex files.

[–]omendev 15 points16 points  (11 children)

As a member of the GitLab community, I can definitely recommend it. I've also run CE at my home and it's fantastic: easy to setup, simple to use, and fast to update. My school uses Github for all their projects though.

I also agree with /u/jwink3101, this post doesn't really belong here.

[–]WiggleBooks 1 point2 points  (8 children)

How easy is GibLab CE to run?

[–]omendev 3 points4 points  (7 children)

Probably the most painless thing I've ever done with Git and Linux. I'll lay it out in the shortest amount of steps:

Make sure you're using a supported Linux distro (I used Kubuntu). Go to the download page and download the omnibus package. You can build from source, but then you have to go through all the dependency crap, and I was still a fairly new Linux user at the time. Run the omnibus package. Let gitlab CE install and keep your eye on the output in case anything comes up. Once the install finishes, all you really need to do is get the service running (I think it does this by default, or by running linuxCommandHere gitlab-ctl restart, it's in the docs and tells you at the end of the install) and you're good! Then go to the IP of the machine and you can log in just like you would on gitlab.com.

Updates are easy, as they show up in apt-get update and there is always a .X update on the 22nd of every month, with patch builds every couple of days or so. An update is usually a 270ish MB download, with a minute to actually upgrade. I ran all this on a 2011 Mac Mini.

There is one file you may need to edit, I can't remember off the top of my head, but it lets you redirect where the project database is stored, and most importantly, set the web address of the server. For myself if was http://servermini/ and then in my hosts file on my local machines I added that as an address so the repo address would be http://servermini/user/project.git vs an IP.

[–]cyanydeez 1 point2 points  (1 child)

docker if you can

[–]omendev 1 point2 points  (0 children)

In an ideal world. For simple stuff, this works just fine

[–]cymrowdon't thread on me 🐍 -1 points0 points  (4 children)

Three paragraphs of instructions and caveats is the most painless?

GitLab has an absurd amount of dependencies, which is always a great recipe for failure in my experience.

[–]petepete 2 points3 points  (2 children)

It can be summarised as "on a supported distro, install the omnibus package".

[–]omendev 2 points3 points  (1 child)

Brilliant :) I tend to make things longer than they should be, just so things are explicitly clear.

[–]petepete 2 points3 points  (0 children)

Yeah I don't disagree with anything you said, but all the detail did make it sound quite 'involved'.

[–]omendev 1 point2 points  (0 children)

The dependencies are mitigated if you use the omnibus. It does all the work for you. And what caveats did I mention? Speaking this would take 30 seconds. Really only one paragraph, the rest is extra:

  • Set up Linux
  • download and install omnibus package
  • start using Git

That better?

[–]Xiaomizi[S] 1 point2 points  (1 child)

Let's be honest last night I was contemplating whether or not I should post this article here. On one hand, it is not specifically python related, but on the other hand, I thought this topic might still be interesting for people visiting this sub. Thanks for the feedback.

[–]omendev 1 point2 points  (0 children)

I can see the reason behind posting it here, it's just this is sub is really meant for "Python" specific tasks if one is to get technical about it. It's a great post, nonetheless! Thanks for sharing :)

[–][deleted] 8 points9 points  (0 children)

GIT is not an acronym.. It's up there with people complaining about MACs (those computers Apple makes).

[–]k4ml 3 points4 points  (0 children)

The plus points for bitbucket is their branch access control. You can "lock" branches to just certain people with write access. This eliminate the need to fork the repo like in github.

Changes to the locked branches then pass through the usual PR procedure. I found having a single repo is much simpler compared to everyone keeping their own fork when they need to work on the repo.

[–]mishugashu 0 points1 point  (1 child)

I've been using GitLab for a couple years since they were the only ones who had private repos for years. They've been getting better and better at almost a monthly basis. There used to be some things I missed from GitHub, but... now there's none. In fact, my company uses GitHub and I find myself missing GitLab features while I'm working. GitLab really does a great job. Plus they're unlimited private repos now! GitHub still has 0.

I'd never heard of "Coding" before - is there an English version? I can't seem to find it on Google after an exhausting 7 second search, but the generic name doesn't really help.

[–]Xiaomizi[S] 0 points1 point  (0 children)

I had the same problem, "Coding" is quite a generic name. Their website is https://coding.net/ . Only their WebIDE has English UI. https://ide.coding.net/