DEV Community

Elayaraj C
Elayaraj C

Posted on

GIT TO GIT LAB DAY 3

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
Enter fullscreen mode Exit fullscreen mode

*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

AWS Q Developer image

Your AI Code Assistant

Ask anything about your entire project, code and get answers and even architecture diagrams. Built to handle large projects, Amazon Q Developer works alongside you from idea to production code.

Start free in your IDE

Top comments (0)

AWS GenAI LIVE image

How is generative AI increasing efficiency?

Join AWS GenAI LIVE! to find out how gen AI is reshaping productivity, streamlining processes, and driving innovation.

Learn more

👋 Kindness is contagious

DEV is better (more customized, reading settings like dark mode etc) when you're signed in!

Okay