git pull origin develop vs git merge
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
I've checked out a feature to start to work; but I wanted to update it with the last develop. But I made a mistake, instead of 'git rebase develop' I did 'git pull origin develop' , and I see that a merge occurred. Is that ok? I can go on, it's similar to to 'git rebase' or 'git merge develop'?
$git checkout feature/migration
Branch 'feature/migration' set up to track remote branch 'feature/migration' from 'origin'.
Switched to a new branch 'feature/migration'
$git pull origin develop
From https://github.com/xxx
* branch develop -> FETCH_HEAD
Auto-merging web/package.json
Auto-merging package.json
Merge made by the 'recursive' strategy.
api/src/entity/User.ts | 8 ++++++ ... more
I did
git reset --hard 619c69ae
log BEFORE reset
$git lg1
* 18ee4066 - (2 minutes ago) Merge branch 'develop' of https://github.com/proj into feature/migration - Dave (HEAD -> feature/migration)
|
| * 619c69ae - (16 hours ago) Merge branch 'release/3.1.64' into develop - Dave (origin/develop, origin/HEAD, develop)
| |
* | | e8491f6e - (3 days ago) fix delete index - Dave (origin/feature/migration)
glog AFTER reset
* 619c69ae - (16 hours ago) Merge branch 'release/3.1.64' into develop - Dave (HEAD -> develop, origin/develop, origin/HEAD, feature/migration)
|
| | * eaa8f62a - (16 hours ago) Merge branch 'release/3.1.64' - Dave (tag: 3.1.64, origin/master, master)
| | |
| | |/
| |/|
| * | 2dda35ad - (16 hours ago) release 3.1.64 - Dave
|/ /
git
add a comment |
I've checked out a feature to start to work; but I wanted to update it with the last develop. But I made a mistake, instead of 'git rebase develop' I did 'git pull origin develop' , and I see that a merge occurred. Is that ok? I can go on, it's similar to to 'git rebase' or 'git merge develop'?
$git checkout feature/migration
Branch 'feature/migration' set up to track remote branch 'feature/migration' from 'origin'.
Switched to a new branch 'feature/migration'
$git pull origin develop
From https://github.com/xxx
* branch develop -> FETCH_HEAD
Auto-merging web/package.json
Auto-merging package.json
Merge made by the 'recursive' strategy.
api/src/entity/User.ts | 8 ++++++ ... more
I did
git reset --hard 619c69ae
log BEFORE reset
$git lg1
* 18ee4066 - (2 minutes ago) Merge branch 'develop' of https://github.com/proj into feature/migration - Dave (HEAD -> feature/migration)
|
| * 619c69ae - (16 hours ago) Merge branch 'release/3.1.64' into develop - Dave (origin/develop, origin/HEAD, develop)
| |
* | | e8491f6e - (3 days ago) fix delete index - Dave (origin/feature/migration)
glog AFTER reset
* 619c69ae - (16 hours ago) Merge branch 'release/3.1.64' into develop - Dave (HEAD -> develop, origin/develop, origin/HEAD, feature/migration)
|
| | * eaa8f62a - (16 hours ago) Merge branch 'release/3.1.64' - Dave (tag: 3.1.64, origin/master, master)
| | |
| | |/
| |/|
| * | 2dda35ad - (16 hours ago) release 3.1.64 - Dave
|/ /
git
add a comment |
I've checked out a feature to start to work; but I wanted to update it with the last develop. But I made a mistake, instead of 'git rebase develop' I did 'git pull origin develop' , and I see that a merge occurred. Is that ok? I can go on, it's similar to to 'git rebase' or 'git merge develop'?
$git checkout feature/migration
Branch 'feature/migration' set up to track remote branch 'feature/migration' from 'origin'.
Switched to a new branch 'feature/migration'
$git pull origin develop
From https://github.com/xxx
* branch develop -> FETCH_HEAD
Auto-merging web/package.json
Auto-merging package.json
Merge made by the 'recursive' strategy.
api/src/entity/User.ts | 8 ++++++ ... more
I did
git reset --hard 619c69ae
log BEFORE reset
$git lg1
* 18ee4066 - (2 minutes ago) Merge branch 'develop' of https://github.com/proj into feature/migration - Dave (HEAD -> feature/migration)
|
| * 619c69ae - (16 hours ago) Merge branch 'release/3.1.64' into develop - Dave (origin/develop, origin/HEAD, develop)
| |
* | | e8491f6e - (3 days ago) fix delete index - Dave (origin/feature/migration)
glog AFTER reset
* 619c69ae - (16 hours ago) Merge branch 'release/3.1.64' into develop - Dave (HEAD -> develop, origin/develop, origin/HEAD, feature/migration)
|
| | * eaa8f62a - (16 hours ago) Merge branch 'release/3.1.64' - Dave (tag: 3.1.64, origin/master, master)
| | |
| | |/
| |/|
| * | 2dda35ad - (16 hours ago) release 3.1.64 - Dave
|/ /
git
I've checked out a feature to start to work; but I wanted to update it with the last develop. But I made a mistake, instead of 'git rebase develop' I did 'git pull origin develop' , and I see that a merge occurred. Is that ok? I can go on, it's similar to to 'git rebase' or 'git merge develop'?
$git checkout feature/migration
Branch 'feature/migration' set up to track remote branch 'feature/migration' from 'origin'.
Switched to a new branch 'feature/migration'
$git pull origin develop
From https://github.com/xxx
* branch develop -> FETCH_HEAD
Auto-merging web/package.json
Auto-merging package.json
Merge made by the 'recursive' strategy.
api/src/entity/User.ts | 8 ++++++ ... more
I did
git reset --hard 619c69ae
log BEFORE reset
$git lg1
* 18ee4066 - (2 minutes ago) Merge branch 'develop' of https://github.com/proj into feature/migration - Dave (HEAD -> feature/migration)
|
| * 619c69ae - (16 hours ago) Merge branch 'release/3.1.64' into develop - Dave (origin/develop, origin/HEAD, develop)
| |
* | | e8491f6e - (3 days ago) fix delete index - Dave (origin/feature/migration)
glog AFTER reset
* 619c69ae - (16 hours ago) Merge branch 'release/3.1.64' into develop - Dave (HEAD -> develop, origin/develop, origin/HEAD, feature/migration)
|
| | * eaa8f62a - (16 hours ago) Merge branch 'release/3.1.64' - Dave (tag: 3.1.64, origin/master, master)
| | |
| | |/
| |/|
| * | 2dda35ad - (16 hours ago) release 3.1.64 - Dave
|/ /
git
git
edited Nov 23 '18 at 8:11
DDave
asked Nov 23 '18 at 7:44
DDaveDDave
407417
407417
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
You are ok to proceed with your development.
But anyway main diffs between rebase
and merge
are
- You get a much cleaner project history from
rebase
by eliminating unnessasary merge commits and re-writing your history in a liner order.
If you still wants to go back and try rebase
then,
Undo merge
git reset --hard ORIG_HEAD
Then rebase
git rebase develop
I've did a : git reset --hard 619c69ae, I've update my question , can you check if is ok too?
– DDave
Nov 23 '18 at 8:08
Git saves the original HEAD pointer in a variable called ORIG_HEAD before doing dangerous operations, so it is simple to recover your branch at the state before the rebase/merge. just trygit reset --hard ORIG_HEAD
– Nuwan Attanayake
Nov 23 '18 at 8:12
the problem i've read late your answer, check my log
– DDave
Nov 23 '18 at 8:13
i see you have reset everything into the commit619c69ae
.Which means you are now just got back to your initial state(state before yougit pull origin develop
).It should OK for you to dogit rebase develop
now.
– Nuwan Attanayake
Nov 23 '18 at 8:29
add a comment |
It is OK. We can roughly say git pull
= git fetch
+ git merge
.
Also, sometimes git rebase
can cause disasters, so you may consider using merge rather than rebase.
However, git rebase
vs git merge
can be different point of view for histories.
can you check my log if all is ok?
– DDave
Nov 23 '18 at 8:22
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53442527%2fgit-pull-origin-develop-vs-git-merge%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
You are ok to proceed with your development.
But anyway main diffs between rebase
and merge
are
- You get a much cleaner project history from
rebase
by eliminating unnessasary merge commits and re-writing your history in a liner order.
If you still wants to go back and try rebase
then,
Undo merge
git reset --hard ORIG_HEAD
Then rebase
git rebase develop
I've did a : git reset --hard 619c69ae, I've update my question , can you check if is ok too?
– DDave
Nov 23 '18 at 8:08
Git saves the original HEAD pointer in a variable called ORIG_HEAD before doing dangerous operations, so it is simple to recover your branch at the state before the rebase/merge. just trygit reset --hard ORIG_HEAD
– Nuwan Attanayake
Nov 23 '18 at 8:12
the problem i've read late your answer, check my log
– DDave
Nov 23 '18 at 8:13
i see you have reset everything into the commit619c69ae
.Which means you are now just got back to your initial state(state before yougit pull origin develop
).It should OK for you to dogit rebase develop
now.
– Nuwan Attanayake
Nov 23 '18 at 8:29
add a comment |
You are ok to proceed with your development.
But anyway main diffs between rebase
and merge
are
- You get a much cleaner project history from
rebase
by eliminating unnessasary merge commits and re-writing your history in a liner order.
If you still wants to go back and try rebase
then,
Undo merge
git reset --hard ORIG_HEAD
Then rebase
git rebase develop
I've did a : git reset --hard 619c69ae, I've update my question , can you check if is ok too?
– DDave
Nov 23 '18 at 8:08
Git saves the original HEAD pointer in a variable called ORIG_HEAD before doing dangerous operations, so it is simple to recover your branch at the state before the rebase/merge. just trygit reset --hard ORIG_HEAD
– Nuwan Attanayake
Nov 23 '18 at 8:12
the problem i've read late your answer, check my log
– DDave
Nov 23 '18 at 8:13
i see you have reset everything into the commit619c69ae
.Which means you are now just got back to your initial state(state before yougit pull origin develop
).It should OK for you to dogit rebase develop
now.
– Nuwan Attanayake
Nov 23 '18 at 8:29
add a comment |
You are ok to proceed with your development.
But anyway main diffs between rebase
and merge
are
- You get a much cleaner project history from
rebase
by eliminating unnessasary merge commits and re-writing your history in a liner order.
If you still wants to go back and try rebase
then,
Undo merge
git reset --hard ORIG_HEAD
Then rebase
git rebase develop
You are ok to proceed with your development.
But anyway main diffs between rebase
and merge
are
- You get a much cleaner project history from
rebase
by eliminating unnessasary merge commits and re-writing your history in a liner order.
If you still wants to go back and try rebase
then,
Undo merge
git reset --hard ORIG_HEAD
Then rebase
git rebase develop
answered Nov 23 '18 at 8:04
Nuwan AttanayakeNuwan Attanayake
631417
631417
I've did a : git reset --hard 619c69ae, I've update my question , can you check if is ok too?
– DDave
Nov 23 '18 at 8:08
Git saves the original HEAD pointer in a variable called ORIG_HEAD before doing dangerous operations, so it is simple to recover your branch at the state before the rebase/merge. just trygit reset --hard ORIG_HEAD
– Nuwan Attanayake
Nov 23 '18 at 8:12
the problem i've read late your answer, check my log
– DDave
Nov 23 '18 at 8:13
i see you have reset everything into the commit619c69ae
.Which means you are now just got back to your initial state(state before yougit pull origin develop
).It should OK for you to dogit rebase develop
now.
– Nuwan Attanayake
Nov 23 '18 at 8:29
add a comment |
I've did a : git reset --hard 619c69ae, I've update my question , can you check if is ok too?
– DDave
Nov 23 '18 at 8:08
Git saves the original HEAD pointer in a variable called ORIG_HEAD before doing dangerous operations, so it is simple to recover your branch at the state before the rebase/merge. just trygit reset --hard ORIG_HEAD
– Nuwan Attanayake
Nov 23 '18 at 8:12
the problem i've read late your answer, check my log
– DDave
Nov 23 '18 at 8:13
i see you have reset everything into the commit619c69ae
.Which means you are now just got back to your initial state(state before yougit pull origin develop
).It should OK for you to dogit rebase develop
now.
– Nuwan Attanayake
Nov 23 '18 at 8:29
I've did a : git reset --hard 619c69ae, I've update my question , can you check if is ok too?
– DDave
Nov 23 '18 at 8:08
I've did a : git reset --hard 619c69ae, I've update my question , can you check if is ok too?
– DDave
Nov 23 '18 at 8:08
Git saves the original HEAD pointer in a variable called ORIG_HEAD before doing dangerous operations, so it is simple to recover your branch at the state before the rebase/merge. just try
git reset --hard ORIG_HEAD
– Nuwan Attanayake
Nov 23 '18 at 8:12
Git saves the original HEAD pointer in a variable called ORIG_HEAD before doing dangerous operations, so it is simple to recover your branch at the state before the rebase/merge. just try
git reset --hard ORIG_HEAD
– Nuwan Attanayake
Nov 23 '18 at 8:12
the problem i've read late your answer, check my log
– DDave
Nov 23 '18 at 8:13
the problem i've read late your answer, check my log
– DDave
Nov 23 '18 at 8:13
i see you have reset everything into the commit
619c69ae
.Which means you are now just got back to your initial state(state before you git pull origin develop
).It should OK for you to do git rebase develop
now.– Nuwan Attanayake
Nov 23 '18 at 8:29
i see you have reset everything into the commit
619c69ae
.Which means you are now just got back to your initial state(state before you git pull origin develop
).It should OK for you to do git rebase develop
now.– Nuwan Attanayake
Nov 23 '18 at 8:29
add a comment |
It is OK. We can roughly say git pull
= git fetch
+ git merge
.
Also, sometimes git rebase
can cause disasters, so you may consider using merge rather than rebase.
However, git rebase
vs git merge
can be different point of view for histories.
can you check my log if all is ok?
– DDave
Nov 23 '18 at 8:22
add a comment |
It is OK. We can roughly say git pull
= git fetch
+ git merge
.
Also, sometimes git rebase
can cause disasters, so you may consider using merge rather than rebase.
However, git rebase
vs git merge
can be different point of view for histories.
can you check my log if all is ok?
– DDave
Nov 23 '18 at 8:22
add a comment |
It is OK. We can roughly say git pull
= git fetch
+ git merge
.
Also, sometimes git rebase
can cause disasters, so you may consider using merge rather than rebase.
However, git rebase
vs git merge
can be different point of view for histories.
It is OK. We can roughly say git pull
= git fetch
+ git merge
.
Also, sometimes git rebase
can cause disasters, so you may consider using merge rather than rebase.
However, git rebase
vs git merge
can be different point of view for histories.
answered Nov 23 '18 at 7:54
Geno ChenGeno Chen
2,81561125
2,81561125
can you check my log if all is ok?
– DDave
Nov 23 '18 at 8:22
add a comment |
can you check my log if all is ok?
– DDave
Nov 23 '18 at 8:22
can you check my log if all is ok?
– DDave
Nov 23 '18 at 8:22
can you check my log if all is ok?
– DDave
Nov 23 '18 at 8:22
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53442527%2fgit-pull-origin-develop-vs-git-merge%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown