# Check Git versiongit--version
# Clone a repositorygitclonerepo_url
# Check the status of your working directorygitstatus
# Add all modified files to staging areagitadd.
# Add a specific file to staging areagitaddfile_name
# Commit changes with a messagegitcommit-m"message"# View commit historygitlog
# View commit history in one linegitlog--oneline
# Create a new branchgitbranchbranch_name
# Switch to a branchgitcheckoutbranch_name
# Create and switch to a new branchgitcheckout-bbranch_name
# Commit changes to the current branchgitcommit-am"message"# Merge a branch into the current branchgitmergebranch_name
# Push changes to the remote repositorygitpushoriginbranch_name
# Pull latest changes from remotegitpull
# Push a branch to remote repositorygitpushoriginbranch_name
Collaboration in Git
# Add a remote repositorygitremoteaddoriginrepo_url
# Check remote repositoriesgitremote-v
# Clone a repositorygitclonerepo_url
# View changes available on remotegitfetch
# Create a new taggittagv1.0.0
# View existing tagsgittag
# Push a tag to remote repositorygitpushoriginv1.0.0
Managing Merge Conflicts
# Check for merge conflictsgitdiff
# After resolving conflicts, add the resolved filesgitaddconflicted_file
# Complete the merge after resolving conflictsgitcommit