Git Rebase Task error

Task is to rebase the feature branch to master and then push the changes, below are the commands I used but the task is still getting failed I am not getting the problem here.

[root@ststor01 demo]# git branch

  • feature
    master

[root@ststor01 demo]# git pull origin feature
From /opt/demo

  • branch feature → FETCH_HEAD
    Already up to date.

[root@ststor01 demo]# gitlog
-bash: gitlog: command not found

[root@ststor01 demo]# git log
commit 5c83d35bfa725c751f56d25279f5b596ca86633a (HEAD → feature, origin/feature)
Author: Admin [email protected]
Date: Thu Sep 14 06:29:03 2023 +0000

Add new feature

commit f5d4b50fffec0b8d9d081d78398ebd0687ca6c5d
Author: Admin [email protected]
Date: Thu Sep 14 06:29:03 2023 +0000

initial commit

[root@ststor01 demo]# git checkout master
Switched to branch ‘master’
Your branch is up to date with ‘origin/master’.

[root@ststor01 demo]# git pull origin master
From /opt/demo

  • branch master → FETCH_HEAD
    Already up to date.

[root@ststor01 demo]# git log
commit 4d477a31da3dfa14275b6c9258554c5e18436e7e (HEAD → master, origin/master)
Author: Admin [email protected]
Date: Thu Sep 14 06:29:03 2023 +0000

Update info.txt

commit f5d4b50fffec0b8d9d081d78398ebd0687ca6c5d
Author: Admin [email protected]
Date: Thu Sep 14 06:29:03 2023 +0000

initial commit

[root@ststor01 demo]# git checkout feature
Switched to branch ‘feature’

[root@ststor01 demo]# git rebase feature
Current branch feature is up to date.

[root@ststor01 demo]# git rebase master
Successfully rebased and updated refs/heads/feature.

[root@ststor01 demo]# git checkout master
Switched to branch ‘master’
Your branch is up to date with ‘origin/master’.

[root@ststor01 demo]# git rebase feature
Successfully rebased and updated refs/heads/master.

[root@ststor01 demo]# git log
commit 622e64bc6f30b1e8c1ea85fdb990cab5a88485fc (HEAD → master, feature)
Author: Admin [email protected]
Date: Thu Sep 14 06:29:03 2023 +0000

Add new feature

commit 4d477a31da3dfa14275b6c9258554c5e18436e7e (origin/master)
Author: Admin [email protected]
Date: Thu Sep 14 06:29:03 2023 +0000

Update info.txt

commit f5d4b50fffec0b8d9d081d78398ebd0687ca6c5d
Author: Admin [email protected]
Date: Thu Sep 14 06:29:03 2023 +0000

initial commit

[root@ststor01 demo]# git push origin master
Enumerating objects: 4, done.
Counting objects: 100% (4/4), done.
Delta compression using up to 36 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 297 bytes | 297.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
To /opt/demo.git
4d477a3…622e64b master → master

Hi @Tej-Singh-Rana , help please for this question

Hi @harshgarg862000 have you saw this post ? Facing difficulty in "Git Hooks" and "Git Rebase" - #20 by carlos140

If you are working in the level 4 labs, there is all the info you need.

Best Regards!

1 Like

Hey @harshgarg862000 do refer to the link provided by @carlos140 it will surely help you…
But, if in case still you won’t be able to make the solution do tell me i will provide you the whole solution here…

Regards…!!

1 Like