Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/akashdeep023/git_demo
This is my first repo
https://github.com/akashdeep023/git_demo
command example git github step-by-step use-git use-github
Last synced: about 1 month ago
JSON representation
This is my first repo
- Host: GitHub
- URL: https://github.com/akashdeep023/git_demo
- Owner: akashdeep023
- Created: 2023-09-01T18:39:13.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-09T12:27:01.000Z (8 months ago)
- Last Synced: 2024-06-09T13:42:01.716Z (8 months ago)
- Topics: command, example, git, github, step-by-step, use-git, use-github
- Language: HTML
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Git & Github Command
## Global To Local
git clone (repo https link) -> add repository (paste link click mouse right)
check list -> ls
open repo -> cd (file name)
create file -> touch (file name)
check file status -> git status
untracked files | modified file etc
add file -> git add (file name) || add all file -> git add .
check file status -> git status
commit file -> git commit -m "(add massage)"
check file states -> git status
push to local to global -> git push origin main
check file states -> git status## Local To Global
Create folder and push repo
cd (folder name)
git push origin main
git init -> used to create a new git repo
git remote add origin (repo link)
git remote -v -> check remote
git branch -> check branch
git branch -M -> rename branch
git push origin main -> push local to global
git commit -am "msg" -> add & commit (modified)
git push -u origin main -> set branch - main , again push enter command -> git push
## Git Branches
git branch -> check branch
git branch -M -> rename branch
git checkout (branch name) -> to navigate (change branch)
git checkout -b (new branch name) -> create new branch
git branch -d (branch name) -> delete branch## Git Merging code
git diff (branch name) -> to compare commits,branches,files & more
git merge (branch name) -> to merge 2 branches## Pull Request
git pull origin main -> pull global to local## Fixing Mistakes
git reset (file name) ya git reset -> staged changes ( back one stage 'git add' ka)
git reset HEAD~1 -> commited changes (back one commite 'git commit' ka)
git reset (commit hash) -> commited changes (for many commits )
git reset --hard (commit hash) -> commited changes (for many commits remove code )## How to create a pull request in other github account.
github---------------
click fork -> fork repository
copy link -> copy fork repo link
terminal-------------
mkdir folder_name -> create folder
cd folder_name -> open folder
git clone -> clone repository
cd repo -> open repository
file exploral -------
copy folder -> copy project folder
paste repo folder -> paste project in repository
terminal-------------
git status -> check status (show untracked)
git add . -> add file or folder
git commit -m "add file" -> commit file or folder
git push origin branch_name -> push local to global
github---------------
refresh github account
open repo
click Pull requests
click New pull request
select branch_name
click Create pull request
type Some message
click Create pull request# Git_Demo
This is my first repository..
# Coder
Akash Deep
# Teacher
Sharadha khapara## Thanks for visit..