Git

Contents
Basics
Installation
Branches
clone, remote, push, pull, github, gitlab
Error analysis
Other articles about Git
Basics
Common user commands
--version: Find out the Git version
config: Set the Git username
--local user.name: Run as a different user
init: Initialize a Git repository
status: Current state of the repository
add: Add a file to the staging area
reset: Remove a file from the staging area
restore: Remove uncommitted changes
commit: Commit changes
checkout -- . : Restore last commit
checkout .: Restore deleted file
diff: Inspect changes
.gitignore file: Ignore certain files
git hash-object
git stash
Install
Installing Git on Linux
Installing Git Bash on Windows
Installing TortoiseGit on Windows
Branches
branch: Branches
Create a new branch
checkout: Change branch
-d: Delete branch
-m: Rename branch
Update branch from remote repository
clone -b: Clone only specific branch
Remote Repo
clone: Clone a remote repository
remote, push, pull, clone,GitLab, Github …
remote -v: Check which remote repository git links a local repository to
remote add origin: Link a remote repository (first time)
remote set-url: Change the linked remote repository
push: Push new data to the remote repository
pull: Download data from the remote repository and update the local one
GitHub
GitLab
Errors
fatal: No such remote 'origin'
error: failed to push some refs to
fatal: Could not read from remote repository
Related Articles
Git
Установка в Windows
Установка TortoiseGit
.gitignore
Необходимые Bash команды
Errors
Development
DevOps
SSH
Работа с API GitHub
Banner Image

Search on this site

Subscribe to @aofeed channel for updates

Visit Channel

@aofeed

Feedback and Questions in Telegram

@aofeedchat