gitlab: history of commits are available after merge request
up vote
1
down vote
favorite
I have forked a project and doing some changes on it during several commits. I want to know if I submit a merge request, history of all commits are available to maintainer or not?
I'm looking for a solution which all commits are aggregated as one commit and I don't know if it does happen during merge request or not? This is because I have do some trial-n-errors and I don't like that these trial-n-errors be visible to project maintainer.
git version-control gitlab
add a comment |
up vote
1
down vote
favorite
I have forked a project and doing some changes on it during several commits. I want to know if I submit a merge request, history of all commits are available to maintainer or not?
I'm looking for a solution which all commits are aggregated as one commit and I don't know if it does happen during merge request or not? This is because I have do some trial-n-errors and I don't like that these trial-n-errors be visible to project maintainer.
git version-control gitlab
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I have forked a project and doing some changes on it during several commits. I want to know if I submit a merge request, history of all commits are available to maintainer or not?
I'm looking for a solution which all commits are aggregated as one commit and I don't know if it does happen during merge request or not? This is because I have do some trial-n-errors and I don't like that these trial-n-errors be visible to project maintainer.
git version-control gitlab
I have forked a project and doing some changes on it during several commits. I want to know if I submit a merge request, history of all commits are available to maintainer or not?
I'm looking for a solution which all commits are aggregated as one commit and I don't know if it does happen during merge request or not? This is because I have do some trial-n-errors and I don't like that these trial-n-errors be visible to project maintainer.
git version-control gitlab
git version-control gitlab
asked Nov 9 at 16:31
VSB
3,87653679
3,87653679
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
up vote
1
down vote
accepted
Yes, if you push your branch, all the history will be there. You can either
#1 Squash all your commits before you push your branch: see Git: How to squash all commits on branch how to do this
or
#2 Squash all your commits on merge: newer versions of gitlab have a feature that if you merge to master, all your commits will be automatically squashed before the actual merge:
See https://docs.gitlab.com/ee/user/project/merge_requests/squash_and_merge.html for more information.
Personally I have done #1 before Gitlab could merge automatically. Now I do #2 all the time. If you don't want the history of all your commits available to the maintaner, you should do #1. Otherwise #2 will work just fine and the end result will be the same: One single commit for your changes.
add a comment |
up vote
1
down vote
Yes, whatever you push, it will be the whole history up there. Some people like to squash commits before doing that. I see a lot of people using git rebase -i
or git merge --squash
for that. I like to do it by hand this way... say it's 10 commits you want to squash:
git reset --soft HEAD~10
git commit -m "blah blah"
Voila! There you have a squashed commit.
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
Yes, if you push your branch, all the history will be there. You can either
#1 Squash all your commits before you push your branch: see Git: How to squash all commits on branch how to do this
or
#2 Squash all your commits on merge: newer versions of gitlab have a feature that if you merge to master, all your commits will be automatically squashed before the actual merge:
See https://docs.gitlab.com/ee/user/project/merge_requests/squash_and_merge.html for more information.
Personally I have done #1 before Gitlab could merge automatically. Now I do #2 all the time. If you don't want the history of all your commits available to the maintaner, you should do #1. Otherwise #2 will work just fine and the end result will be the same: One single commit for your changes.
add a comment |
up vote
1
down vote
accepted
Yes, if you push your branch, all the history will be there. You can either
#1 Squash all your commits before you push your branch: see Git: How to squash all commits on branch how to do this
or
#2 Squash all your commits on merge: newer versions of gitlab have a feature that if you merge to master, all your commits will be automatically squashed before the actual merge:
See https://docs.gitlab.com/ee/user/project/merge_requests/squash_and_merge.html for more information.
Personally I have done #1 before Gitlab could merge automatically. Now I do #2 all the time. If you don't want the history of all your commits available to the maintaner, you should do #1. Otherwise #2 will work just fine and the end result will be the same: One single commit for your changes.
add a comment |
up vote
1
down vote
accepted
up vote
1
down vote
accepted
Yes, if you push your branch, all the history will be there. You can either
#1 Squash all your commits before you push your branch: see Git: How to squash all commits on branch how to do this
or
#2 Squash all your commits on merge: newer versions of gitlab have a feature that if you merge to master, all your commits will be automatically squashed before the actual merge:
See https://docs.gitlab.com/ee/user/project/merge_requests/squash_and_merge.html for more information.
Personally I have done #1 before Gitlab could merge automatically. Now I do #2 all the time. If you don't want the history of all your commits available to the maintaner, you should do #1. Otherwise #2 will work just fine and the end result will be the same: One single commit for your changes.
Yes, if you push your branch, all the history will be there. You can either
#1 Squash all your commits before you push your branch: see Git: How to squash all commits on branch how to do this
or
#2 Squash all your commits on merge: newer versions of gitlab have a feature that if you merge to master, all your commits will be automatically squashed before the actual merge:
See https://docs.gitlab.com/ee/user/project/merge_requests/squash_and_merge.html for more information.
Personally I have done #1 before Gitlab could merge automatically. Now I do #2 all the time. If you don't want the history of all your commits available to the maintaner, you should do #1. Otherwise #2 will work just fine and the end result will be the same: One single commit for your changes.
answered Nov 10 at 15:42
mles
1,68242958
1,68242958
add a comment |
add a comment |
up vote
1
down vote
Yes, whatever you push, it will be the whole history up there. Some people like to squash commits before doing that. I see a lot of people using git rebase -i
or git merge --squash
for that. I like to do it by hand this way... say it's 10 commits you want to squash:
git reset --soft HEAD~10
git commit -m "blah blah"
Voila! There you have a squashed commit.
add a comment |
up vote
1
down vote
Yes, whatever you push, it will be the whole history up there. Some people like to squash commits before doing that. I see a lot of people using git rebase -i
or git merge --squash
for that. I like to do it by hand this way... say it's 10 commits you want to squash:
git reset --soft HEAD~10
git commit -m "blah blah"
Voila! There you have a squashed commit.
add a comment |
up vote
1
down vote
up vote
1
down vote
Yes, whatever you push, it will be the whole history up there. Some people like to squash commits before doing that. I see a lot of people using git rebase -i
or git merge --squash
for that. I like to do it by hand this way... say it's 10 commits you want to squash:
git reset --soft HEAD~10
git commit -m "blah blah"
Voila! There you have a squashed commit.
Yes, whatever you push, it will be the whole history up there. Some people like to squash commits before doing that. I see a lot of people using git rebase -i
or git merge --squash
for that. I like to do it by hand this way... say it's 10 commits you want to squash:
git reset --soft HEAD~10
git commit -m "blah blah"
Voila! There you have a squashed commit.
answered Nov 9 at 16:45
eftshift0
4,064817
4,064817
add a comment |
add a comment |
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%2f53229698%2fgitlab-history-of-commits-are-available-after-merge-request%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