37 | Git

Published on Aug 19, 2021 | By Tesvan team



Installing, configuring, creating a repository

For example, you need to transfer the information you created (from your home or work computer) to a server (for example, the GitHub repository).

So that every member of your team, or, for example, an instructor, can access your files.

In this case, you need to decide which folder or file you want to synchronize with the server, i.e. create a local storage (repository).

We will consider it using the example of working with IDEA and managing from the console. This example is not specifically tied to the software used, so you can repeat this example for your specific situation.


Step by step:

  1. Create your own GIT HUB repository. This will be our server storage, which any participant can work with and access to it.
  2. Create your own free repository on GITHUB Install GIT itself, to do this, follow the link and download the current version for today: DOWNLOAD GIT Free
  3. In the appeared GIT console window on your computer (or cmd console), enter the following commands from the keyboard (each command ends by pressing the Enter key) :
  • git - this command displays a list of available commands, but for us now it simply serves as a confirmation that step 2 was done correctly and GIT is working
  • git config --global user.name "Ivan Ivanov" - specify your name.
  • git config --global user.email [email protected] - specify your email address
  • cd: C: / Users / Ivanov / IdeaProjects / Project1 - with this command you go to the folder you need, which in the next step you will make as a local storage (i.e. this is your working directory where all project changes will be stored)
  • git init - Create a repository in the current directory
  • git add. - this command indexes (checks and remembers) all files (dot at the end of the command), which later will be subject to commit (essentially saved).
  • git commit -m "Commit Text" - saving changes to a local folder.

That's it, the local repository has been created, now we need to link the local and remote (GITHUB created in point 1) repositories. To do this, we need to enter the following commands:

  • git remote add origin https://github.com/GithubUser/RepositiryName.git - where, https://github.com/GithubUser/RepositiryName.git the address of the repository you created on GitHub can be copied directly from the browser with the addition of .git
  • git push -u origin master

Congratulations, you have linked the remote and local repositories.


To upload files to the remote repository, run the command:

git push - after pressing Enter, the first time you are asked to enter your GitHub username and password.

You can now see the changes made on the GitHub site.

Please note that after you have made changes with the files, in our example, this saved the project in IDEA, you need to run the following commands:

  • git add. - this command indexes (checks and remembers) all files (dot at the end of the command), which later will be subject to commit (essentially saved).
  • git commit -m "Commit Text" - saving changes to a local folder.

To transfer to the remote repository, run this command as well:

git push

In order, on the contrary, to get information from the remote repository to the local repository, run the command:

git pul



Useful links
1. Git article/eng/
2. Git article/eng/
3. GitHub video tutorial/eng/
4. Git video tutorial/eng/

Interesting For You

35 | Regular expressions

Aug 19, 2021 | By Tesvan team

Regular expressions  Useful links1. Regular expressions article/eng/2. Regular expressions article/rus/3. Regular expressions video tutorial/eng/4. Regular expr...

24 | Defect Severity and Defect Priority

Aug 17, 2021 | By Tesvan team

Defect Severity Every defect impacts on the system at some level. This impact is measured by the “Severity” parameter. Severity type is categorized by Software ...