From 2cfe53f58c5781df7417fd05a3678ecb20037cbe Mon Sep 17 00:00:00 2001 From: MONIKAKEERTHANA <51728824+MONIKAKEERTHANA@users.noreply.github.com> Date: Fri, 21 Jul 2023 09:48:26 +0530 Subject: [PATCH 1/6] Update git and github --- git and github | 2 ++ 1 file changed, 2 insertions(+) diff --git a/git and github b/git and github index 8541010..707fdd6 100644 --- a/git and github +++ b/git and github @@ -112,5 +112,7 @@ git checkout monika git add . git commit -m "message" git log +27) Never commit on main branch and creating your first pull request +for any new features you want to add, create a new pull request to merge it into main branch From 5809a9bf30d27213d6a9e8332a055ddf7782deb6 Mon Sep 17 00:00:00 2001 From: MONIKAKEERTHANA <51728824+MONIKAKEERTHANA@users.noreply.github.com> Date: Fri, 21 Jul 2023 09:53:33 +0530 Subject: [PATCH 2/6] Update git and github --- git and github | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/git and github b/git and github index 707fdd6..0cc1958 100644 --- a/git and github +++ b/git and github @@ -114,5 +114,12 @@ git commit -m "message" git log 27) Never commit on main branch and creating your first pull request for any new features you want to add, create a new pull request to merge it into main branch +28) Removing a commit from the pull request by force pushing +git log +git reset hashid +git status +git add . +git stash +git push origin monika - f From bf33cce0928537231dbec448490aba278fad985d Mon Sep 17 00:00:00 2001 From: MONIKAKEERTHANA <51728824+MONIKAKEERTHANA@users.noreply.github.com> Date: Fri, 21 Jul 2023 10:17:46 +0530 Subject: [PATCH 3/6] Update git and github --- git and github | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/git and github b/git and github index 0cc1958..7bc8b2a 100644 --- a/git and github +++ b/git and github @@ -121,5 +121,15 @@ git status git add . git stash git push origin monika - f +29) merging a pull request +30)Making forked project even with main project +we can fetch upstream button +git status +git log +git fetch --all --prune +git reset --hard upstream/main +git log +git push origin main +git pull upstream main From 7306008db7b056cca7d4328897dcaaac7eff6cf6 Mon Sep 17 00:00:00 2001 From: MONIKAKEERTHANA <51728824+MONIKAKEERTHANA@users.noreply.github.com> Date: Fri, 21 Jul 2023 10:20:42 +0530 Subject: [PATCH 4/6] Update git and github --- git and github | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/git and github b/git and github index 7bc8b2a..b90b5cf 100644 --- a/git and github +++ b/git and github @@ -131,5 +131,9 @@ git reset --hard upstream/main git log git push origin main git pull upstream main +31)squashing your commits +whenever you create new branch it is created from head +git branch branchname +git checkout branchname// now head is pointing to the new branch From e34d0dfcf2b0efb743833af673b0edbcb861dcf5 Mon Sep 17 00:00:00 2001 From: MONIKAKEERTHANA <51728824+MONIKAKEERTHANA@users.noreply.github.com> Date: Fri, 21 Jul 2023 10:26:32 +0530 Subject: [PATCH 5/6] Update git and github --- git and github | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/git and github b/git and github index b90b5cf..df8169d 100644 --- a/git and github +++ b/git and github @@ -135,5 +135,13 @@ git pull upstream main whenever you create new branch it is created from head git branch branchname git checkout branchname// now head is pointing to the new branch +32)using the rebase command +git log +git rebase -i hashid +-i stands for interactive command +all the above commits, we can either pick or squash +all the squash commits are merged into one +git log + From 71070e8916cbd99cc784842ff640483781fc5fd3 Mon Sep 17 00:00:00 2001 From: MONIKAKEERTHANA <51728824+MONIKAKEERTHANA@users.noreply.github.com> Date: Fri, 21 Jul 2023 10:35:07 +0530 Subject: [PATCH 6/6] Update git and github --- git and github | 1 + 1 file changed, 1 insertion(+) diff --git a/git and github b/git and github index df8169d..ca045e2 100644 --- a/git and github +++ b/git and github @@ -142,6 +142,7 @@ git rebase -i hashid all the above commits, we can either pick or squash all the squash commits are merged into one git log +33)merge conflicts and how to resolve them?