22MCC20067 WS1
22MCC20067 WS1
22MCC20067 WS1
b) Create a python file named as your UID (eg.22MCC20001.py) with some code inside it on a
Local Repository named as your UID (e.g. 22MCC20001). Push this file on Remote Repo.
c) Create another Local Repository named as your name (e.g. ABC) and pull the files from Remote
Repo in it. After this, create a new file in new Local Repo i.e. ABC and push it to Remote Repo.
Again, pull the files on old Local Repo i.e. 22MCC20001.
d) At last, visit Remote Repo and commit some changes in a file created i.e. 22MCC20001.py and
pull the file again in new Local Repo i.e. ABC. Check whether the changes are existing in file in
Local Repo or not.
Step 2 : After successful installation configure Git using git config command.
e.g, git config --global user.name "neerajkukreti357" and
git config --global user.email [email protected]
Step 10 : Now push local repository to remote repository using git push -u origin main.
Code for practical: (c)
Step 1 : Create another folder named 22MCC20067 using mkdir command.
Step 2 : To pull from GitHub repository initialize empty git repository using git init command.
Step 3 : After that link remote repository to the local repository using git remote add origin
<remote_repository_link>.
Step 4 : Now you can pull from remote repository using git pull origin main.
Step 5 : Now create a new file and add it on git staging area using git add 22MCC20067.py
command.
Step 6 : Commit changes using git commit -m “Message”.
Step 7 : To push new changes to remote repository, use git using git push -u origin main.
Step 8 : To pull the new changes to the old local repository use git pull origin main command.