S
S
sorry_i_noob2019-02-17 01:26:13
git
sorry_i_noob, 2019-02-17 01:26:13

Is it possible to push all my local commits but make it look like one commit?

Hello. I cloned the remote repository myself. I worked on it. In the course of work, I made temporary commits with messages that are clear only to me. It's time to push. Can I do a push that sends all my changes (all my commits), but they look like one commit? With the message of one (last) commit.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
T
TyzhSysAdmin, 2019-02-17
@POS_troi

when will you all learn to read the documentation for the tools you use?
Well, or at least google, well, or at least look into the help of the same github?
You pollute the database with useless bytes and then store it all, feed it with electricity, and then global warming, the destruction of the Amazon forests, the attack of aliens :)
https://github.com/wprig/wprig/wiki/How-to-squash-...
https ://htmlacademy.ru/blog/27-how-to-squash-commi...

6
6elkka, 2019-02-17
@6elkka

Let develop be the original branch, feature be your branch. Then:

git checkout feature  # убедиться что ты на своей ветке
git rebase develop  # убедиться что она растет из develop'а
git reset --soft develop  # уничтожить все новые коммиты не изменяя файлы
git commit -a  # добавить все изменения одним коммитом

B
bkosun, 2019-02-17
@bkosun

There are several options:
https://help.github.com/articles/about-pull-requests...

V
Vitsliputsli, 2019-02-17
@Vitsliputsli

git-flow.
In your branch (feature) have fun as you want, then merge into develop, and already send develop to the server. As a result, your branch does not get into the repository at all, only the final result.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question