Basic Git cheat sheet (#shorts)

1 year ago
38

Hi Friends,

Please check these basic Git Cheat Sheet commands. I hope this will help you in your projects.

Here's a basic Git cheat sheet:

Basic Commands:
------------------------------

git init: initialize a Git repository in the current directory
git add {file}: stage a file to be committed
git commit -m "{commit message}": commit staged changes with a message
git status: check the status of your working directory and staged changes
git log: view the commit history
git diff: view the changes between the working directory and the last commit

Branching:
-------------------

git branch: view all branches in the repository
git branch {branch-name}: create a new branch with the specified name
git checkout {branch-name}: switch to the specified branch
git merge {branch-name}: merge the specified branch into the current branch
git branch -d {branch-name}: delete the specified branch

Remote Repositories:
-----------------------------------

git clone {remote-url}: clone a remote repository to your local machine
git remote -v: view the list of remote repositories
git push {remote-name} {branch-name}: push local changes to a remote repository
git pull {remote-name} {branch-name}: pull changes from a remote repository
git fetch {remote-name} {branch-name}: fetch changes from a remote repository without merging

These are just a few of the most commonly used basic Git commands. For more information, you can refer to the official Git documentation.

#git #gitcommands #shortsvideo #shorts #shortsfeed #short #shortsyoutube #shortfeed #shortsviral #shorts_video #trending #viral #princecheema_official #gitinit #gitadd #gitcommit #gitstatus #gitlog #gitdiff #gitbranch #gitbranchname #gitcheckout #gitmerge #gitdeletebranch #gitbranchdelete #gitclone #gitremove #gitpush #gitpull #gitfetch #popular #famousshorts #famous #trendingshorts #trendingvideo #trendingshort #trendingnow

Loading comments...