πŸ“ Git Cheat Sheet πŸš€

πŸ“ First Steps: Start and Configure A Git πŸš€

Command
Description

git init
Creates a new Git repository in the current folder.

git config –global -l
Sets or views Git settings, like username and email ,…

git config $option “text”


This content originally appeared on DEV Community and was authored by Anass Assim

πŸ“ First Steps: Start and Configure A Git πŸš€

Command Description
git init Creates a new Git repository in the current folder.
git config --global -l Sets or views Git settings, like username and email ,...
git config $option "text" Sets a Git configuration option to a specified value.

πŸ“… Day-to-Day Work:

Command Description
git status Displays the current status of the working directory and staging area.
git add $File_Name Stages a file for the next commit.
git commit -m "Message" Records changes to the repository with a descriptive message.
git diff Displays differences between changes and the last commit.
git log --oneline Displays a concise summary of commits in a single line.
git checkout $hash Switches to the specified commit by its hash.
git fetch Retrieves updates from the remote repository without merging.
git pull Fetches and merges updates from the remote repository.
git push Uploads local commits to the remote repository.
git restore $FileName Restores the specified file to the last committed state.
git blame Shows line-by-line authorship for each line in a file.
git stash Temporarily saves changes that are not ready to be committed.
git tag Creates a marker for a specific commit, often used for releases.

πŸ“‚ Files:

Command Description
.gitconfig File Stores Git settings like username and preferences.
.gitignore file specifies files and directories for Git to ignore.


This content originally appeared on DEV Community and was authored by Anass Assim


Print Share Comment Cite Upload Translate Updates
APA

Anass Assim | Sciencx (2024-10-25T22:34:51+00:00) πŸ“ Git Cheat Sheet πŸš€. Retrieved from https://www.scien.cx/2024/10/25/%f0%9f%93%9d-git-cheat-sheet-%f0%9f%9a%80/

MLA
" » πŸ“ Git Cheat Sheet πŸš€." Anass Assim | Sciencx - Friday October 25, 2024, https://www.scien.cx/2024/10/25/%f0%9f%93%9d-git-cheat-sheet-%f0%9f%9a%80/
HARVARD
Anass Assim | Sciencx Friday October 25, 2024 » πŸ“ Git Cheat Sheet πŸš€., viewed ,<https://www.scien.cx/2024/10/25/%f0%9f%93%9d-git-cheat-sheet-%f0%9f%9a%80/>
VANCOUVER
Anass Assim | Sciencx - » πŸ“ Git Cheat Sheet πŸš€. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/10/25/%f0%9f%93%9d-git-cheat-sheet-%f0%9f%9a%80/
CHICAGO
" » πŸ“ Git Cheat Sheet πŸš€." Anass Assim | Sciencx - Accessed . https://www.scien.cx/2024/10/25/%f0%9f%93%9d-git-cheat-sheet-%f0%9f%9a%80/
IEEE
" » πŸ“ Git Cheat Sheet πŸš€." Anass Assim | Sciencx [Online]. Available: https://www.scien.cx/2024/10/25/%f0%9f%93%9d-git-cheat-sheet-%f0%9f%9a%80/. [Accessed: ]
rf:citation
» πŸ“ Git Cheat Sheet πŸš€ | Anass Assim | Sciencx | https://www.scien.cx/2024/10/25/%f0%9f%93%9d-git-cheat-sheet-%f0%9f%9a%80/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.