Git is software for tracking changes in any set of files, usually used for coordinating work among programmers collaboratively developing source code during software development. Its goals include speed, data integrity, and support for distributed, non-linear workflows.
20 Git commands Every Developer should know-
🔸git init - Initialize or reinitialize a repository.
🔸git clone https://github.com/shubhamp/project - clone a repository.
🔸git add hello.py - add hello.py to staging area.
🔸git add -A - add new files, update, modified files and remove deleted files from staging area.
🔸git status-current status of working tree.
🔸git diff - show all unstaged changes.
🔸git commit -m “commit message here”- commit staged changes.
🔸git merge<branch-name> -merge a branch with current directory.
🔸git branch -d<branch-name> - delete a branch
🔸git checkout<tag> — checkout a specific tag
🔸git mv index.html file.html - move index.html to file.html
🔸git log - shows all the commits, author name, time
🔸git push origin master - pushes to remote master branch.
🔸git stash - save all local changes.
🔸git stash pop - apply and drop all the saved changes.
🔸git stash apply- only apply all the previously saved changes
🔸git tag - display all the tags.
🔸git fetch origin master - fetch from a remote repository
🔸git pull origin master - fetch and merge from remote repository.
🔸git remote -v - verify the remote.