- created a new branch and switched to that branch
git checkout -b main - Created a new file
touch b.txt - performed git add and commit with commit name.
git add .git commit -m "Commit message" - Added one more commit using the same command as 3.
git checkout master- To check all the commits
git log - merge main commit with master commit
git merge main git log- Created one more commit
git add .git commit -m "Commit message" git checkout mastergit add .git commit -m "Commit message"- Added one more commit using the same command used in 10.
git checkout master- To check all the commits
git log - merge main commit with master commit
git merge main git log- created a new branch and switched to that branch
git checkout -b main1 - created a file
touch c.txt - Added and commited
git checkout master- Commited again
git checkout main1git rebase master- updated text file
- To restore the changes
git stash - To check the changes made
git stash pop git stash list- one more commit on a.txt
git add .git commit -m "Commit message" git checkout main- one more commit on b.txt
git add .git commit -m "Commit message" - Taking the commit id using
git log git checkout mastergit cherry-pick commit-idgit checkout mastergit log- created multiple stash in a single branch(main) using
git stash - to pop up a particular stash
git stash apply stash@{1}
-
Notifications
You must be signed in to change notification settings - Fork 0
Himanshur25/git
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
About
No description or website provided.
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published