Image description

To create a new Git project in the terminal

To create a new Git project in the terminal, follow these steps:
1. Open Terminal

Ensure you have Git installed by running:

git --version

If Git is not installed, install it using:

Ubuntu/Linux: sudo apt install git

*2.Open Gitlab *
Create New project in Gitlab and select Blank Project.

Image description

3.TO connect Git to Gitlab

Image description

Click the code select and copy HTTPS or SSH.
After copy the link paste the link in Git.
$ git clone

Image description

If clone is started after showing .git file.
Create a new text document.
$ git status
$ git add txt

Image description

4.Add a New file
IF want to add additional files in git repository.
$ touch test 1
$ git add .
git add . is used to select all files.

5. TO untrack file
$ git restore --staged
$ git status

Finally to commit and push it git lab.
$ git commit -m"done"
$ git push

Image description