Difference between revisions of "Introduction to Git"

From ALFA
Jump to: navigation, search
(Clone)
(Clone ALFA Repository)
Line 59: Line 59:
 
* Hit Browse and go to your .ppk file you saved earlier.
 
* Hit Browse and go to your .ppk file you saved earlier.
 
* Save changes.
 
* Save changes.
 +
 +
=== Settings and KDIFF3 ===
 +
 +
* Download and intstal KDiff3 into your Programs directory https://sourceforge.net/projects/kdiff3/files/kdiff3/
 +
* In Git Extensions, open Tools/Settings
 +
* Select KDiff as your merge and diff tools and set the path to it
 +
* Configure other settings

Revision as of 19:55, 5 July 2020

Git is a piece of software that allows multiple developers to work together on a project. It provides you with methods of reverting changes through incremental backups, control who can/can't send changes, and more.

In this article, you will be learning how to set your computer up to access repositories on GitHub.


GitHub Registration

The first step is to create a GitHub account.

  • Open the registration link.
  • Provide a username, password, and email that you do not mind other builders knowing.
  • You do not need a paid plan.

Once registered, send a message to your HDM or a GitHub tech team owner.

Installing Git Extensions

Git Extensions is the software you will be using to interact with Git. It provides a clean user interface so that you will not have to learn any command line operation.

  • Download Git Extensions.
    • Check the box to install Git for Windows
    • Check the box to install Kdiff
    • Use PuTTY instead of OpenSSH.

Creating SSH Keys

Generation

  • Navigate to the folder where you installed Git Extensions.
  • Open the PuTTY subfolder.
  • Open puttygen.exe
  • Click the generate button.
  • Move the mouse around until the bar has finished filling.
  • Optional: Type in a comment.
  • Optional: Type in a password.
  • Save the public key somewhere you'll remember. Your home directory in a ssh folder works. Save it as <comment above>.pub.
  • Save the private key in the same place as <comment above>.ppk
  • Do not close the window yet!


Teach to GitHub

  • Navigate to Github's SSH Settings.
  • Click New SSH Key.
  • Give the title <comment above>.
  • Go back to Putty Generator. Go to the top box and copy the contents.
  • Paste the contents into the box on the GitHub website.
  • Click Add Key.
  • You may now close PuttyGen.

Clone ALFA Repository

Clone

(You will need to be added to the build team by the repository owner, probably the Infrastructure Admin or HDM, before cloning.)

  • Open up Git Extensions.
  • Select Clone GitGub repository from the common actions pane.
  • Select the second tab to search.
  • Search for alfa010_bg.
  • Select the one from A Land Far Away.
  • Near the bottom, use the Browse button to navigate to your <My Documents>\Neverwinter Nights 2\modules folder.
  • Rename the local directory from alfa010_bg to alfa010_bg_build.

Automatic Authentication

  • In Git Extensions, navigate to Repository > Remote Repositories.
  • Hit Browse and go to your .ppk file you saved earlier.
  • Save changes.

Settings and KDIFF3