FIRST-TIME SETUP FOR GIT


This is PART-03 of the Yet Another GIT-Reference series.

Firstly, before doing anything we need to configure/setup some things:-

  1. REMOTE SETUP
  2. (For a Self-Hosted one, simply follow IT'S documentation)

    Here; All we need to do is create an account in any one of the GIT-Hosting services, Here are some of the Sites/Platforms with their Links:

    Next; create a repository under your said account in your GIT-Hosting service of your choice, there are documentations to show you what you need to do in order to make one if you find it troublesome, Usually it right in front of you, it’s easy.[ & Let’s call the repository “MY_REPO]

    However; You can also SELF-HOST your own GIT-Instance/Service via CERTAIN TOOLKITS & here are some of them with Links:

    But this is an advanced topic & we’ll learn in the near/distant future if fortune favors it :-)

  3. LOCAL SETUP
  4. (Very convenient, ESPECIALLY when using a Self-Hosted GIT-Service)

    • CONFIGURING YOUR IDENTITY
    • you have to set "YOUR_NAME"& in order to do exactly that the command is:

      git config --global user.name "YOUR_NAME"

      & For setting "YOUR_EMAIL"-Address, the command is:

      git config --global user.email YOUR_EMAIL

    • CONFIGURING YOUR EDITOR
    • This step may not be necessary [If not configured, GIT uses your system’s default editor, which is NANO & it's easy to use], but just in case let’s cover this. Since you’ll be using the Command-Line Interface [CLI for short] a lot here
      So In order to set a different text-editor as the default text-editor [e.g: Here we’ll use “micro” as an example of another CLI-Based editor] in order to write stuff like “Commit-Messages” the command is as follows:

      git config --global core.editor micro

      You will only need to do all of the above actions ONCE & If you want to check your configuration settings, you can use the following command to list all the settings GIT can find:

      git config --list