“Commandes de base GIT” Réponses codées

Commandes de base GIT

git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin [email protected]:xyz/reponame.git
git push -u origin main
Zany Zebra

Commandes de base GIT

git status
Perfect Panda

Commandes de base GIT

// Git Basic commands
git init
  - Initializes the current folder as a git repository 

git status
  - Current status of the folder 

git add path/to/file
 - To add a particular file

git add .
  - add all files staging area -
 
git commit -m "First commit"
  - commit the changes to the git repository

git log --oneline
 - see a brief log of commits in line by line

git log
 - see a brief log of commits with author and date

git checkout <commit> <file>
  - checkout the file from an older commit

git checkout -- <file> 
 - to discard changes in working directory

git reset <file>
  - unstage a staged file, but leave working directory unchanged

git reset
  - reset the staging area to the last commit without disturbing the working directory
Chetan Nada

Commandes de base GIT

git commit -m "Commit message"
Fancy Flatworm

Commandes de base GIT

git push origin <branchname>
Fancy Flatworm

Commandes de base GIT

git clone username@host:/path/to/repository
Fancy Flatworm

Commandes de base GIT

git checkout -b <branchname>
Fancy Flatworm

Commandes de base GIT

git push --all origin
Fancy Flatworm

Commandes de base GIT

git merge <branchname>
Fancy Flatworm

Commandes de base GIT

git add <filename>

git add *
Fancy Flatworm

Réponses similaires à “Commandes de base GIT”

Questions similaires à “Commandes de base GIT”

Plus de réponses similaires à “Commandes de base GIT” dans Shell/Bash

Parcourir les réponses de code populaires par langue

Parcourir d'autres langages de code