This Repository contains assignemnts and resources of the session Introduction to GIT
After Successfully installing with all Recommended Settings
Open your CMD/Terminal
Type
git config ––global user.name “your github_username”
git config ––global user.email “email_address”
Now Create a Repository in your Github
Copy the repo url
git init
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/psathyanarayan/testtt.git
git push -u origin main
Or by coding then pushing to this repo
git remote add origin https://github.com/psathyanarayan/testtt.git
git branch -M main
git push -u origin main
Creating and changing Branches
This creates and changes to the new branch new
git branch new
git checkout new
I commited 3 chnages to my file
Shows all my commit with their SHA1
If I need to know what is in the 2nd commit of Hello.py
git show 66874b6:Hello.py
Where 66874b6 is the shown SHA key when we perform the above step
If I need to revert to this change then
git checkout 66874b6 Hello.py
Clone this Repo with the below command from your repository
git clone your forked repo url with no quotes
Note Before cloning please install git
After cloning Open the folder then edit the Hello.py file by adding the below command
Then Commit it with a message
git commit -m "Added Your Name"
If you have configed git then
After you pushed to your forked repo You need to create a Pull Request
Follow the instructions
Click on Pull request after you commited as shown
Click on New Pull request
Click on Create Pull request as shown