Here are some commonly used Git commands that are useful for DBA (Database Administrator):
-
git clone
: This command is used to clone an existing Git repository. It creates a local copy of the repository on your machine, allowing you to work on the code and push and pull changes from the remote repository. -
git checkout
: This command is used to switch between different branches in a Git repository. It allows you to work on multiple versions of the code simultaneously, and to switch between them as needed. -
git branch
: This command is used to create, list, and delete branches in a Git repository. It allows you to manage multiple versions of the code and to collaborate with other developers on different branches. -
git merge
: This command is used to merge changes from one branch into another branch. It allows you to integrate changes from multiple branches and resolve any conflicts that may arise. -
git push
: This command is used to push local changes to a remote Git repository. It allows you to share your changes with other developers and collaborate on the code. -
git pull
: This command is used to pull changes from a remote Git repository to your local machine. It allows you to update your local copy of the code with the latest changes from other developers. -
git diff
: This command is used to compare two versions of a file and see the differences between them. It allows you to review changes before committing them to the repository. -
git log
: This command is used to view the commit history for a Git repository. It allows you to see the changes that have been made to the code and who made them.