https://github.com/samithseu/git-basic
Git Basic Commands - Commands មូលដ្ឋានសម្រាប់ Git
https://github.com/samithseu/git-basic
git github html
Last synced: about 2 months ago
JSON representation
Git Basic Commands - Commands មូលដ្ឋានសម្រាប់ Git
- Host: GitHub
- URL: https://github.com/samithseu/git-basic
- Owner: samithseu
- Created: 2024-07-06T09:55:16.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-06-26T11:36:01.000Z (12 months ago)
- Last Synced: 2025-07-01T23:48:42.352Z (12 months ago)
- Topics: git, github, html
- Homepage:
- Size: 4.35 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Git Basic Commands 🤏
## 1. Clone A Remote Repository
### 1.1. From GitHub
```bash
git clone [repo_url]
# Example: git clone https://github.com/samithseu/git-basic.git
```
### 1.2. From GitLab
```bash
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
```bash
git init
```
### 2.2. Check status
```bash
git status
```
### 2.3 Track files
```bash
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
```bash
git commit -m [messages]
# Example: git commit -m "initial commit"
```
### 2.5. Create and change branch
```bash
git branch -M [branch_name]
# Example: git branch -M main
```
### 2.6. Add remote repo to a local repo
```bash
git remote add [remote_name] [repo_url]
# Example: git remote add origin https://github.com/samithseu/git-basic
```
### 2.7. Push to remote repo
```bash
git push [remote_name] [branch_name]
# Example: git push origin main
```