[LINUX] I tried two ways to combine multiple commits in Git

When I put together a commit with rebase, I caused a petite or mischievous matter. I was advised that "patch should be used to reflect multiple commits at once", but when I googled, many methods of combining with rebase were introduced. I did not understand the difference between these two methods, so I will record it with my own caution.

Overview of the two methods in the first place

1. How to apply patch file

How to combine multiple commits into a single diff

2. How to put together with rebase

Reference site

A little messy story with rebase

What failed

(@Personal branch) $ git merge develop
$ git rebase -i HEAD~Summarize commits with xx
$ git push -f origin <branch>

I took the above steps. What will happen? ... It was bad to use $ git rebase -i HEAD ~ xx if there was a commit by someone other than yourself between the commits you were trying to put together, as in this case. Putting it together with $ git rebase -i HEAD ~ xx, it also recommits other people's commits. At this time, it will be summarized as your own commit, so you will have committed yourself. I had to put together only my own commits first and then merge the develop branch. (See here)

Summary

General

approach

Recommended Posts

I tried two ways to combine multiple commits in Git
Two ways to display multiple graphs in one image with matplotlib
I tried to implement permutation in Python
I tried to implement PLSA in Python 2
I tried to implement ADALINE in Python
I tried to implement PPO in Python
I tried to integrate with Keras in TFv1.1
I tried to implement TOPIC MODEL in Python
I tried to implement selection sort in python
I tried to debug.
I tried to paste
I tried to graph the packages installed in Python
I tried to implement a pseudo pachislot in Python
I tried to implement Dragon Quest poker in Python
I tried to implement GA (genetic algorithm) in Python
I tried to summarize how to use pandas in python
API implementation to toggle values in two ways (go)
I tried to create API list.csv in Python from swagger.yaml
I tried to learn PredNet
I tried to implement a one-dimensional cellular automaton in Python
I tried to organize SVM.
I tried using "Syncthing" to synchronize files on multiple PCs
I tried to implement PCANet
I tried to summarize the code often used in Pandas
I tried "How to get a method decorated in Python"
I tried to illustrate the time and time in C language
I tried using git inspector
I tried to reintroduce Linux
I tried to summarize the commands often used in business
I tried to implement the mail sending function in Python
I tried to introduce Pylint
I tried to make a stopwatch using tkinter in python
I tried to summarize SparseMatrix
I tried to touch jupyter
I tried to implement StarGAN (1)
I tried to implement blackjack of card game in Python
I wanted to delete multiple objects in s3 with boto3
I tried to create an article in Wiki.js with SQLAlchemy
I tried to process the image in "sketch style" with OpenCV
I wrote a function to load a Git extension script in Python
I tried to implement a misunderstood prisoner's dilemma game in Python
I tried to make an analysis base of 5 patterns in 3 years
I tried to process the image in "pencil style" with OpenCV
I tried to log in to twitter automatically with selenium (RPA, scraping)
I tried to implement Deep VQE
I tried to create Quip API
I tried to touch Python (installation)
I tried to implement adversarial validation
I tried to explain Pytorch dataset
Two Ways to Make Ansible Portable
I tried Watson Speech to Text
I tried running GAN in Colaboratory
I tried to touch Tesla's API
6 ways to string objects in Python
I tried to implement hierarchical clustering
I tried to organize about MCMC.
I tried to implement Realness GAN
I tried Line notification in Python
I tried to move the ball
I tried to estimate the interval.
[Python] I tried to summarize the set type (set) in an easy-to-understand manner.