1 14 Git commands as a data scientist:

WebPage: rpubs.com/alinemati/Essential_Git_Commands

Linkedin.com/in/ali-nemati/

instagram.com/artificial_intelligence_ml

facebook.com/artificialintelligenceml

1.1 Initialize a new Git repository in a directory:

$ cd my_project
$ git init

1.2 Clone an existing Git repository:

$ git clone https://github.com/my_username/my_repo.git

1.3 Add a file to the Git index:

$ git add my_file.py

1.4 Commit changes to the local Git repository:

$ git commit -m "Add new functionality to my_file.py"

1.5 Push committed changes to a remote Git repository:

$ git push origin master

1.6 Pull changes from a remote Git repository:

$ git pull origin master

1.7 Check the status of the Git repository:

$ git status

1.8 Display a log of all commits:

$ git log

1.9 Create a new branch:

$ git branch new_feature

1.10 Switch to a different branch:

$ git checkout new_feature

1.11 Merge changes from one branch into another:

$ git merge new_feature

1.12 Fetch changes from a remote Git repository:

$ git fetch origin

1.13 Stash changes that are not ready to be committed:

$ git stash

1.14 Reset the Git repository to a previous commit:

$ git reset HEAD~1