Understanding common operations
Understanding the basic commands of Git is paramount for anyone working in the field of data science. In the previous section, we delved into how to set up a GitHub repository, either by cloning an existing repository or starting a new one from scratch. In this section, we will explore common Git operations that will help you manage your repositories more effectively.
So, let’s take a look at some operations:
- Configuring Git (
config
): Git’s configuration settings can be found in the.gitconfig
file, which is usually located in the user’s home directory. To modify these settings, use thegit config
command. Set your name and email address, which will be attached to each commit you make:git config --global user.name "Your Name" git config --global user.email "youremail@domain.com"
Check your settings:
git config --list
- Checking the status (
status
): Thegit status
command provides information about the...