Skip to content

samithseu/git-basic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 

Repository files navigation

Git Basic Commands 🤏

choosing language English   |   ភាសាខ្មែរ

1. Clone A Remote Repository

1.1. From GitHub

git clone [repo_url]
# Example: git clone https://github.com/samithseu/git-basic.git

1.2. From GitLab

git clone [repo_url]
# Example: git clone https://gitlab.com/vuejs9055841/using-i18n.git

2. Push From Local To Remote Repository

2.1 Initialize a local git repo

git init

2.2. Check status

git status

2.3 Track files

git add [file_name(s)]
# Example1: git add index.html style.css
# Example2: git add . (for adding all new changed files)

2.4. Commit files with messages

git commit -m [messages]
# Example: git commit -m "initial commit"

2.5. Create and change branch

git branch -M [branch_name]
# Example: git branch -M main

2.6. Add remote repo to a local repo

git remote add [remote_name] [repo_url]
# Example: git remote add origin https://github.com/samithseu/git-basic

2.7. Push to remote repo

git push [remote_name] [branch_name]
# Example: git push origin main

About

Git Basic Commands - Commands មូលដ្ឋានសម្រាប់ Git

Topics

Resources

Stars

Watchers

Forks

Contributors