Pages: 1 2 »
  Print  
Author Topic: New GitHub Repository  (Read 5962 times)
Offline (Male) RetroX
Posted on: January 06, 2012, 05:45:49 PM

Master of all things Linux
Contributor
Location: US
Joined: Apr 2008
Posts: 1055
MSN Messenger - classixretrox@gmail.com
View Profile Email
I've just set up a repository on GitHub for ENIGMA. You can find it here: https://github.com/enigma-dev/enigma-dev

If you're running a Linux-based distro, you can install the git package, then run the following command to create a local copy:
Code: [Select]
git clone git://github.com/enigma-dev/enigma-dev.git(note: git checkout is not like svn checkout; git clone is svn checkout)

For those of you that want something like TortoiseSVN, TortoiseGit is also available. If you don't know how Git works, I'd suggest learning it (it's not the same as SVN) or asking someone how to use it.

From GitHub, you can fork the repository (and then push changes in your fork back to us), submit bugs (either there or on flyspray here), and watch for changes. You can also view a list of files and commits with much more ease. If you want to download a copy of the repo at any time, GitHub also supports this: https://github.com/enigma-dev/enigma-dev/downloads

One of the largest differences between Git and SVN is Git's naming of commits; instead of using incremented numbers, it uses hashes. Commits can be named using tags (git tag <name> <commit>), and you can switch to a specific tag or branch with (git checkout <tag/branch>). Git also makes a single .git directory in the root instead of SVN's recursive .svn nonsense.

Note that the SVN repo is still up, but I'm not entirely sure of how things are going to work with either.  This is a very large change, however, is really for the better.
Logged
My Box: Phenom II 3.4GHz X4 | ASUS ATI RadeonHD 5770, 1GB GDDR5 RAM | 1x4GB DDR3 SRAM | Arch Linux, x86_64 (Cube) / Windows 7 x64 (Blob)
Quote from: Fede-lasse
Why do all the pro-Microsoft people have troll avatars? :(
Offline (Male) Rusky
Reply #1 Posted on: January 06, 2012, 05:47:56 PM

Resident Troll
Joined: Feb 2008
Posts: 955
MSN Messenger - rpjohnst@gmail.com
View Profile WWW Email
git clone is closer to a remote svnadmin dump actually :P
Logged
Offline (Male) RetroX
Reply #2 Posted on: January 06, 2012, 05:52:32 PM

Master of all things Linux
Contributor
Location: US
Joined: Apr 2008
Posts: 1055
MSN Messenger - classixretrox@gmail.com
View Profile Email
git clone is closer to a remote svnadmin dump actually :P
Except, it works with compressed objects, not raw files.
Logged
My Box: Phenom II 3.4GHz X4 | ASUS ATI RadeonHD 5770, 1GB GDDR5 RAM | 1x4GB DDR3 SRAM | Arch Linux, x86_64 (Cube) / Windows 7 x64 (Blob)
Quote from: Fede-lasse
Why do all the pro-Microsoft people have troll avatars? :(
Offline (Unknown gender) TheExDeus
Reply #3 Posted on: January 06, 2012, 08:41:34 PM

Developer
Joined: Apr 2008
Posts: 1872

View Profile
Soo how exactly committing changes will work? In SVN it was extremely easy.. I suspect it will be as easy in GIT too? For example, I am on Win and want to have a GUI program (its just nicer) to commit a change to the repository. What steps would I use?
Logged
Offline (Male) RetroX
Reply #4 Posted on: January 06, 2012, 09:09:27 PM

Master of all things Linux
Contributor
Location: US
Joined: Apr 2008
Posts: 1055
MSN Messenger - classixretrox@gmail.com
View Profile Email
Soo how exactly committing changes will work? In SVN it was extremely easy.. I suspect it will be as easy in GIT too? For example, I am on Win and want to have a GUI program (its just nicer) to commit a change to the repository. What steps would I use?
TortoiseGit is designed like TortoiseSVN with a very similar interface, intended for git instead. I don't quite know how either works, but I'll explain the main difference between git's committing and SVN's. Git has more options, but you can still commit in what's mostly the same way as SVN.

SVN commits are centralised, meaning that you have to send the commits to the central server for them to count. SVN only has one way of committing: you can add files that haven't yet been versioned (which will then make them versioned) and then commit, which will commit all modified or newly versioned files.

Git operates on a series of local repositories. This means that with Git, you "clone" the source repository, mess with it however that you want, and then push all of your changes to the destination repository. Through this process, you can make as many commits as you want, amend your commits, and even uncommit what you've done. However, once you move the changes to the destination repository, you're pretty much stuck with those commits. If you uncommit or amend things that are already on the destination repository, you'll have a hard time getting the repository to actually push new changes, because the changes don't match.

Git commits operate as staged and unstaged changes; essentially, anything that you've changed but haven't "staged" won't actually be committed. For example, if I modifed file1 and file2, which are versioned, adding a new commit won't commit those changes that I've made unless I explicitly ask for it (that's SVN's behaviour; you can still do this if you want). You also have to add new files, like SVN. Note that if you modify or delete a file after you stage it, those changes won't be applied until you stage it again. Once you commit something, you have to send it to the destination repository for it to actually be "committed" to the overall repository.

I'm assuming that things like TortoiseSVN and TortoiseGit already support a mechanism for "commit all," which will essentially just stage everything, commit, and push to the master repo, with a given commit message. Git largely replicates the functionality of SVN, although, it has a lot more features and operates slightly differently. It's also a lot faster and compresses things, making it easier and faster to pull from the remote repos.
Logged
My Box: Phenom II 3.4GHz X4 | ASUS ATI RadeonHD 5770, 1GB GDDR5 RAM | 1x4GB DDR3 SRAM | Arch Linux, x86_64 (Cube) / Windows 7 x64 (Blob)
Quote from: Fede-lasse
Why do all the pro-Microsoft people have troll avatars? :(
Offline (Unknown gender) TheExDeus
Reply #5 Posted on: January 07, 2012, 05:56:52 AM

Developer
Joined: Apr 2008
Posts: 1872

View Profile
We will see how this goes. I didn't like that I will have problems committing conflicted data, or that I can't revert changes when I move everything in the destination repository, but maybe I just didn't quite clearly understand. It was easy for me to understand SVN as it has only one button - Commit. You choose the files you want to commit, write a description of the changes and sit back (takes a few seconds to finish). I don't really need new "features" in this process, so I was fine with it before.
Logged
Offline (Male) RetroX
Reply #6 Posted on: January 07, 2012, 11:04:05 AM

Master of all things Linux
Contributor
Location: US
Joined: Apr 2008
Posts: 1055
MSN Messenger - classixretrox@gmail.com
View Profile Email
We will see how this goes. I didn't like that I will have problems committing conflicted data, or that I can't revert changes when I move everything in the destination repository, but maybe I just didn't quite clearly understand. It was easy for me to understand SVN as it has only one button - Commit. You choose the files you want to commit, write a description of the changes and sit back (takes a few seconds to finish). I don't really need new "features" in this process, so I was fine with it before.

I probably didn't explain that properly.

What I meant is that the git equivalent of "svn checkout" is really a complete clone of the repository. This means that you can check back older revisions without downloading any new stuff, and you can commit/uncommit/amend commits as much as you want before you push it back to the origin repo. The problem with this is that, for example, you clone the repo and then uncommit something that's already on the dest repo, it'll give you a bit of trouble. But in most cases, people won't want to (or even know how) to uncommit something or amend a commit.

In svn, the default is to commit ALL changes to the server, whereas in git, the default is to not commit any changes unless you specifically say so (allowing you to selectively commit files). If you just want to commit everything, git supports that, too.

The new features can be made transparent to most users, but can be made very useful to other users.
Logged
My Box: Phenom II 3.4GHz X4 | ASUS ATI RadeonHD 5770, 1GB GDDR5 RAM | 1x4GB DDR3 SRAM | Arch Linux, x86_64 (Cube) / Windows 7 x64 (Blob)
Quote from: Fede-lasse
Why do all the pro-Microsoft people have troll avatars? :(
Offline (Male) Rusky
Reply #7 Posted on: January 07, 2012, 12:44:48 PM

Resident Troll
Joined: Feb 2008
Posts: 955
MSN Messenger - rpjohnst@gmail.com
View Profile WWW Email
Quick conversion guide:

"svn checkout" sets up a local repository, linked to the server you checkout from.
"git clone" sets up a local repository with the entire project history (don't worry, it's fast), linked to the server you clone from.

"svn add" tells Subversion to start tracking a file.
"git add" does tell Git to start tracking a file, but its primary usage is to tell Git to put a file's current state in the "index" or "staging area", a kind of scratchpad for the next commit. Use it right before you commit.

"svn update" downloads new changes from the server and applies them to the working directory.
"git pull" downloads new changes from the server and merges them with your local commits.

"svn commit" finds modified files and sends the diffs to the server with your description.
"git commit" takes what you've "git add"ed to the index and stores it with your description. Using the -a flag like "git commit -a" adds all tracked files to the index before doing this.
"git push" sends new local commits to the server.

Basically, Git splits a few of the steps you're used to in Subversion so that useful things can be inserted between them. The Subversion workflow of "svn checkout; edit; svn add; svn update; svn commit; ..." becomes "git clone; edit; git add; git commit; git pull; git push; ..." You can use "git gui" or TortoiseGit instead of the command line if you like.
Logged
Offline (Male) Josh @ Dreamland
Reply #8 Posted on: January 07, 2012, 04:05:16 PM

Prince of all Goldfish
Developer
Location: Pittsburgh, PA, USA
Joined: Feb 2008
Posts: 2949

View Profile Email
You buried my neat shit. >:(

Logged
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble
"I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
Offline (Male) notachair
Reply #9 Posted on: January 07, 2012, 05:45:18 PM

Definitely not a chair
Contributor
Joined: Feb 2008
Posts: 299

View Profile
Also, if you are on Linux or OS X:

Code: [Select]
git config --global core.autocrlf input
And Windows:

Code: [Select]
git config --global core.autocrlf true
Deals with newline issues when working across different OSes.
Logged
Offline (Male) RetroX
Reply #10 Posted on: January 07, 2012, 06:16:41 PM

Master of all things Linux
Contributor
Location: US
Joined: Apr 2008
Posts: 1055
MSN Messenger - classixretrox@gmail.com
View Profile Email
Also, random thing that I found out the hard way:

If you're just interested in getting the latest revision (no version control), you can run:
Code: [Select]
git clone git://github.com/enigma-dev/enigma-dev.git --depth 1This will essentially download an unversioned copy of the latest revision.

This will prevent you from downloading all of the commits, which would be pretty big. It has a downside, however, of preventing you from pushing commits to the master repo.
Logged
My Box: Phenom II 3.4GHz X4 | ASUS ATI RadeonHD 5770, 1GB GDDR5 RAM | 1x4GB DDR3 SRAM | Arch Linux, x86_64 (Cube) / Windows 7 x64 (Blob)
Quote from: Fede-lasse
Why do all the pro-Microsoft people have troll avatars? :(
Offline (Male) RetroX
Reply #11 Posted on: January 07, 2012, 08:10:07 PM

Master of all things Linux
Contributor
Location: US
Joined: Apr 2008
Posts: 1055
MSN Messenger - classixretrox@gmail.com
View Profile Email
Notice: You'll probably all have to re-clone now that I've removed the versioned binaries from the commit history. The clone size is half what it was, now.
Logged
My Box: Phenom II 3.4GHz X4 | ASUS ATI RadeonHD 5770, 1GB GDDR5 RAM | 1x4GB DDR3 SRAM | Arch Linux, x86_64 (Cube) / Windows 7 x64 (Blob)
Quote from: Fede-lasse
Why do all the pro-Microsoft people have troll avatars? :(
Offline (Male) notachair
Reply #12 Posted on: January 09, 2012, 04:50:06 PM

Definitely not a chair
Contributor
Joined: Feb 2008
Posts: 299

View Profile
This looks like a nice guide - http://rogerdudler.github.com/git-guide/
Logged
Offline (Female) IsmAvatar
Reply #13 Posted on: January 13, 2012, 08:22:59 PM

LateralGM Developer
LGM Developer
Location: Pennsylvania/USA
Joined: Apr 2008
Posts: 886

View Profile Email
In addition, LGM is moving to Git as well.
https://github.com/IsmAvatar/LateralGM

EnigmaBot already reflects these changes.

There has still been some debate on what to do with the Auto-Updater, though.

A few pages on the Wiki will probably need to reflect this as well - especially once we figure out what to do with the Auto-Updater.
Logged
Offline (Female) IsmAvatar
Reply #14 Posted on: January 15, 2012, 05:38:07 PM

LateralGM Developer
LGM Developer
Location: Pennsylvania/USA
Joined: Apr 2008
Posts: 886

View Profile Email
Thanks to Rusky, we were able to restore many lost svn revisions caused by herp-derping the svn repositories back in the day (adding the trunk/branches/tags folders) and herp-derp-git-importing them without accounting for that. Rusky fixed it, but we had to delete the git repositories and re-create them.

This will probably also mean that those of you who already checked out (cloned) either of the repositories will need to re-clone again, since they both now have a more complete history. Likewise, to anybody who was watching either of the repositories, you will need to re-watch them again.

Hopefully (cross our fingers) this will be the last time we have to do that. I'm sure you all understand - the initial setup/transfer can be a little unstable, but now that we have things going again, it should all be good.



Also, the guide a2h found is amazing. Perfect for my needs.
« Last Edit: January 15, 2012, 07:50:10 PM by IsmAvatar » Logged
Pages: 1 2 »
  Print