Skip to content

sumo47/Sumit-kumar-Learning-Git

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 

Repository files navigation

Sumit-kumar-Learning-Git

#https://sumo47.github.io/Sumit-kumar-Learning-Git/

Creating a new repo with name - Sumit-Learning-git

Screenshot (521)

Cloned Repo using git clone https://github.com/sumo47/Sumit-kumar-Learning-Git.git

Screenshot 2024-04-19 115151

Create a new branch named "feature-branch" from the main/master branch.

code - git checkout -b feature-branch Screenshot 2024-04-19 115657

checked using git status using git status Screenshot 2024-04-19 120653

Added changes to the staging area and Commit changes with a meaningful commit message.

added all files using git add . commit - git commit -m "added new file" Screenshot 2024-04-19 130802

Pushed changes to the remote repository.

git push origin feature-branch Screenshot 2024-04-19 132217

Create a new branch named "collaborator-branch" from the primary/master branch.

Screenshot 2024-04-19 131229

created file in main branch ( in line 34 there is written card title) Screenshot (522)

changed written word in line no 34 in collaborator-branch Screenshot 2024-04-19 185357

Mergeed in Main from collaborator-branch using git merge collaborator-branch Screenshot (523)

going to feature-branch using git checkout feature-branch and changed in line 34 again Screenshot (524)

added and commited in feature-branch Screenshot (525)

pushed in feature-branch Screenshot (526)

Now come back to main branch and trying to merge in main branch from feature-branch

Clearly, we can see that there is a conflict occurring in the main branch. Now, I have to resolve the conflict manually. Screenshot (527)

Resolved merge conflict that asised

and added , committed in main branch Screenshot (529)

i have done some changes in main branch for switching previous commit and used code - git checkout <hash> for switching to previous commit Screenshot (530) Screenshot (531)

after write command code - git reset --hard Head~1 i can able to undo the last commit Screenshot (533)

revert

i have done 3 commit for revert Screenshot 2024-04-20 000604

now i want to come back first commit than i have to use some command like code - git revert <hash> Screenshot (543) there is some conflict occur , have to resolve

After resolve conflict , revert has been successfully done Screenshot (544)

Created a pull request from "collaborator-branch" to main/master.

and after resolve conflict i have successfully pulled from collaborator-branch in main branch Screenshot (545) Screenshot (546) Screenshot (547) Screenshot (548) Screenshot (549) Screenshot (551)

Forked a repository from another user's account. (Fork this repo - https://github.com/Tanvi-Ambre/Movie_Search)

Screenshot (553) Screenshot (554)

Created a new branch in the forked repository.

Screenshot (555) Screenshot 2024-04-20 002725

- Make changes and create a pull request to the original repository.

Screenshot (562) Screenshot (563) Screenshot (564)

- Use the Git Lens extension in Visual Studio Code to visualize Git history.

Screenshot (565)

- Deploy a static website using GitHub Pages.

Screenshot (556) Screenshot 2024-04-20 004509 Screenshot (561)