Results 1 to 20 of 20

Thread: Introduction to Git

  1. #1
    Join Date
    Dec 2010
    Posts
    431
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Introduction to Git

    Introduction to Git
    How to use it and it's purpose, for regular users and developers.
    Please note that this tutorial is intended for Windows users.
    Git is...
    • Fast
    • Free
    • Open source


    Git, a version control system, is an alternative program to subversion. Git, however, is more advanced and appeals to a developer on higher levels, offering full repository history while offline and simple-to-use merging while opening up to a wide range of developers via the fork system.

    However, Git can be hard to use for the average user, and can be simplified by downloading an user interface embedding Git.

    Obtaining Git
    Git can be downloaded from here, or choose the link below that corresponds to your operating system.
    Please note that the table below may be outdated and it is wiser to use the above link.


    Once you've downloaded your installer, you can proceed to install the application. This should be self explanatory, but if not, I will describe how to do so on Windows.

    Open the installer and navigate your way through until you get to "Adjusting your PATH environment". You should be presented with three options. If you're a developer, it would be wise to choose the second one (Run Git from the Windows Command Prompt), however, if you're a normal user or a new-developer, feel free to leave it as default (the first one).
    Proceed to make your way through the rest of the installer and install with default values.
    Once Git has installed it would be a good idea to restart your computer.


    Installing an User Interface
    A great free user interface is TortoiseGit.
    To download TortoiseGit, please visit this page or click this direct download link.
    Once the installer has downloaded, open it and let it guide you through the installation (keep default values).
    Once the installation is completed you should restart your computer.


    Obtaining and Keeping a Repository Updated
    In this segment, you will learn how to download and keep a repository updated. We will be using srl-reflection as an example.
    First, create a folder called "Reflection" in your Simba includes folder.
    Next, you need to get the Git clone URL. You can do this by going to the main repositories github page and copying the link.


    Next, you will want to right click the Reflection folder and click "Git Clone..."



    A window titled "Git clone" should pop up, paste in the Git clone link and then remove the trailing folder in Directory input.



    Click OK and let it Clone the repository. When it's done you should see a window like so, and click Close.



    Congratulations! You've obtained a clone of srl-reflection!
    Now, here comes the simple part. To keep the repository updated, periodically right click the directory and select "Git pull", this will pull all new updates to your local clone.



    Click OK to the Pull window that appears, and you should see a window something like this when it's done updating, click close and you're good to go!



    Developers
    Using Git as a developer is extraordinary. Git has the ability to work offline (unlike a non-local subversion control) and that enables itself to be able to execute (all) commands faster than subversion. Git also has an excellent merging process. Files can be merged together from almost any version of the repository, regardless of how outdated the clone is. This appeals to a developer more because [with multiple people], some may make changes, but be a repository or five behind.

    For this segment, I will be using RRL as an example.

    First, create your folder and clone the repository of your choosing, if you do not know how to do this, please read until you do under "Obtaining and Keeping a Repository Updated".

    Uploading changes
    Every time you change a file, it should become a red file with an exclamation mark, signifying that it's modified.
    To commit changes, you simply go to "TortoiseGit > Git Commit -> "master". Select the files you wish to commit locally, enter a message, and click OK.



    When it's completed, click Close on the opened dialogue.

    Please note. When you commit all your changes you're able to update your repository without losing them (the changes), as they will be merged (with any new updates). You run the risk of losing your changes if you don't commit them locally (plus, it shouldn't be allowed). NO COMMITED CHANGES ARE LIVE UNTIL YOU PUSH TO THE SERVER!

    When you're ready to make the changes live, or you regain internet access, right-click and select Git Push. Enter your password to your github account and let the magic happen. Click Close when it's finished.



    Updating the repository
    When updating the repository, you may have some un-pushed commits. Before updating, make sure all changes are commited to your local repository. Right click the folder and select Git pull. This will initiate an update sequence of your clone, please note that any password requested is your Github password.

    Once updated, all files should be merged respectfully. If there are any conflicts, you can easily resolve them by right clicking and selecting "Resolve" under the TortoiseGit menu.

    Please Note. After updating to the latest push, you will be allowed to push commits to the server.




    Accepting a pull request
    Coming soon.

    Tips & Tricks
    Optimizing your right-click context menu for user friendliness.
    Coming soon.
    Last edited by Train; 02-21-2011 at 12:27 PM.

  2. #2
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    This is very much needed!

    Good job, and thanks! rep+

  3. #3
    Join Date
    Jan 2011
    Location
    Denver, CO
    Posts
    1,351
    Mentioned
    2 Post(s)
    Quoted
    72 Post(s)

    Default

    Nice tut, I needed this

  4. #4
    Join Date
    Feb 2009
    Location
    Irvine, CA
    Posts
    2,873
    Mentioned
    8 Post(s)
    Quoted
    138 Post(s)

    Default

    Rep+

    I've been wondering if there was a gui for git!

  5. #5
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Awesome man, really needed this . rep+

  6. #6
    Join Date
    Dec 2010
    Posts
    431
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks guys, added [part of] the developers section!

  7. #7
    Join Date
    Oct 2007
    Location
    #srl
    Posts
    6,102
    Mentioned
    39 Post(s)
    Quoted
    62 Post(s)

    Default

    Yeah, this really couldn't have come at a better time. Nice job.

  8. #8
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    Nice.

    I really suggest learning how to use git-bash though rather than tortoise git..

    Also, you should link to the actual git tutorials out there.
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  9. #9
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,691
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    For those interested in console based, I wrote a quick tutorial too. (it assumes you've previously used svn)
    http://villavu.com/forum/showthread.php?t=55618



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

  10. #10
    Join Date
    Dec 2010
    Posts
    431
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    @Nava2: Well, tbh, I wrote this off my personal experience with the program, I honestly have no idea where the official tutorial is.
    @Wizzup?: Cool , I was planning to add my own section like that too--eventually. :P

  11. #11
    Join Date
    Mar 2007
    Posts
    1,700
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

  12. #12
    Join Date
    Mar 2006
    Location
    Behind you
    Posts
    3,193
    Mentioned
    61 Post(s)
    Quoted
    63 Post(s)

    Default

    Nice tut timer i'll go ahead and stickify it.

    ~BraK

    "Sometimes User's don't need the Answer spelled out with Code. Sometimes all they need is guidance and explanation of the logic to get where they are going."

  13. #13
    Join Date
    Dec 2010
    Posts
    431
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by BraK View Post
    Nice tut timer i'll go ahead and stickify it.

    ~BraK
    Thank you.

  14. #14
    Join Date
    Sep 2010
    Location
    Northern Kentuckeh
    Posts
    759
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    I downloaded the tortoise interface and I am not finding the gitclone option.

  15. #15
    Join Date
    Jan 2011
    Location
    Denver, CO
    Posts
    1,351
    Mentioned
    2 Post(s)
    Quoted
    72 Post(s)

    Default

    Quote Originally Posted by Train View Post
    @Nava2: Well, tbh, I wrote this off my personal experience with the program, I honestly have no idea where the official tutorial is.
    http://help.github.com/win-set-up-git/

    Found this a little easier to use than your method, idk why

  16. #16
    Join Date
    Dec 2010
    Posts
    431
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by doublex8 View Post
    I downloaded the tortoise interface and I am not finding the gitclone option.
    git clone, not gitclone.

  17. #17
    Join Date
    Sep 2010
    Location
    Northern Kentuckeh
    Posts
    759
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by Train View Post
    git clone, not gitclone.
    lol either way it isn't showing up as that...at least it wasn't 9 hours ago...now it is. Before though the option was Git sync or some thing with sync in it.

  18. #18
    Join Date
    Dec 2010
    Posts
    431
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by doublex8 View Post
    lol either way it isn't showing up as that...at least it wasn't 9 hours ago...now it is. Before though the option was Git sync or some thing with sync in it.
    Go to the tortoise git tab, there should be a huge list--it'll be there.

  19. #19
    Join Date
    Sep 2010
    Location
    Northern Kentuckeh
    Posts
    759
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by Train View Post
    Go to the tortoise git tab, there should be a huge list--it'll be there.
    Well like I said it finally showed up as Git clone instead of Git sync but when it was Git sync there was no option even in the tab. I got what I needed though so thanks

  20. #20
    Join Date
    Feb 2007
    Location
    PA, USA
    Posts
    5,240
    Mentioned
    36 Post(s)
    Quoted
    496 Post(s)

    Default

    Thanks bro, just used this <3

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •