How to use github Gitl

Git global setup
git config --global user.name "Nawaraj Luitel"
git config --global user.email "luitel.nawaraj12300@gmail.com"
Create a new repository
git clone git@gitlab.com:nawarajluitel/my_project_123.git
cd my_project_123
touch README.md
git add README.md
git commit -m "add README"
git push -u origin master
Push an existing folder
cd existing_folder
git init
git remote add origin git@gitlab.com:nawarajluitel/my_project_123.git
git add .
git commit -m "Initial commit"
git push -u origin master
Push an existing Git repository
cd existing_repo
git remote rename origin old-origin
git remote add origin git@gitlab.com:nawarajluitel/my_project_123.git
git push -u origin --all
git push -u origin --tags
 
 
 
 

…or create a new repository on the command line

echo "# Eydean-Intern" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/Nawaraj1111/Eydean-Intern.git
git push -u origin main
                

…or push an existing repository from the command line

git remote add origin https://github.com/Nawaraj1111/Eydean-Intern.git git branch -M main git push -u origin main
 

Comments