All git commands list

๐ด๐ถ๐ ๐ถ๐ป๐ถ๐: It is used to initialize a new Git repository in working directory.
๐ด๐ถ๐ ๐ฐ๐น๐ผ๐ป๐ฒ <๐ฟ๐ฒ๐ฝ๐ผ> : It is used to take the clone or copy of existing project in your local machine.
๐ ๐ฎ๐ธ๐ฒ ๐๐ต๐ฎ๐ป๐ด๐ฒ๐
๐ด๐ถ๐ ๐๐๐ฎ๐๐๐: It is used to check the status of changes in files of working project. using git status command you can view the files/changes that are currently unstaged.
๐ด๐ถ๐ ๐ฎ๐ฑ๐ฑ <๐ณ๐ถ๐น๐ฒ๐ป๐ฎ๐บ๐ฒ> : When you made the changes in your files you’ll want to stage them for a commit. git add command adds a specific file to the stage.
๐ด๐ถ๐ ๐ฎ๐ฑ๐ฑ . ๐ผ๐ฟ ๐ด๐ถ๐ ๐ฎ๐ฑ๐ฑ -๐: Using this command you can add all your changed files to the stage with one command Instead of adding files one by one.
๐ด๐ถ๐ ๐ฐ๐ผ๐บ๐บ๐ถ๐ -๐บ “๐๐ผ๐บ๐บ๐ถ๐ ๐บ๐ฒ๐๐๐ฎ๐ด๐ฒ”: Now you can commit all your stages changes/files with a descriptive message.
๐๐ฟ๐ฎ๐ป๐ฐ๐ต๐ถ๐ป๐ด
git branch <๐ฏ๐ฟ๐ฎ๐ป๐ฐ๐ต๐ป๐ฎ๐บ๐ฒ>: For create a new branch this command (git branch branchname) is used.
๐ด๐ถ๐ ๐ฏ๐ฟ๐ฎ๐ป๐ฐ๐ต: This command is used for list all the local branches in your current repository.
๐ด๐ถ๐ ๐ฐ๐ต๐ฒ๐ฐ๐ธ๐ผ๐๐ <๐ฏ๐ฟ๐ฎ๐ป๐ฐ๐ต๐ป๐ฎ๐บ๐ฒ> : Using this branch you can switch to a different branch.
๐ด๐ถ๐ ๐บ๐ฒ๐ฟ๐ด๐ฒ <๐ฏ๐ฟ๐ฎ๐ป๐ฐ๐ต๐ป๐ฎ๐บ๐ฒ> : If you want to bring your changes from one branch to another you can use git merge command
๐ฅ๐ฒ๐บ๐ผ๐๐ฒ ๐ฅ๐ฒ๐ฝ๐ผ๐๐ถ๐๐ผ๐ฟ๐ถ๐ฒ๐
๐ด๐ถ๐ ๐ฝ๐๐๐ต ๐ผ๐ฟ๐ถ๐ด๐ถ๐ป <๐ฏ๐ฟ๐ฎ๐ป๐ฐ๐ต๐ป๐ฎ๐บ๐ฒ> : Using this command you can sends your commits to the remote repository.
๐ด๐ถ๐ ๐ฝ๐๐น๐น: If many people are working in same project you’ll want to keep your repo up to date using git pull command you can fetch and merge all changes from the remote repository
๐ด๐ถ๐ ๐ฟ๐ฒ๐บ๐ผ๐๐ฒ -๐ :This command is used to check which remote servers are connected with local repository.
๐๐ฒ๐ ๐๐ถ๐ณ๐ณ๐ฒ๐ฟ๐ฒ๐ป๐ฐ๐ฒ๐
๐ด๐ถ๐ ๐ณ๐ฒ๐๐ฐ๐ต ๐๐ ๐ด๐ถ๐ ๐ฝ๐๐น๐น: Both download data from a remote repository. However, git fetch just downloads it without integrating it while git pull also merges it into your local files.
๐ด๐ถ๐ ๐บ๐ฒ๐ฟ๐ด๐ฒ ๐๐ ๐ด๐ถ๐ ๐ฟ๐ฒ๐ฏ๐ฎ๐๐ฒ: Both incorporate changes from one branch to another. git merge combines the source and target branches via a new commit, whereas git rebase moves or combines commits to a new base, making a cleaner history.
๐ด๐ถ๐ ๐ฟ๐ฒ๐๐ฒ๐ ๐๐ ๐ด๐ถ๐ ๐ฟ๐ฒ๐๐ฒ๐ฟ๐: Both are used to undo changes. git reset discards local changes completely, while git revert undoes public changes by creating a new reversing commit thereby preserving history.

Happy Learning ๐