D
D
Danil Antoshkin2015-08-13 16:58:46
git
Danil Antoshkin, 2015-08-13 16:58:46

How to push only the last commit?

There is a master branch, there is a doc branch (there are all documentation changes) in master there is only a completed version, so how can you pour into master only the last commit in doc and not the whole history?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
J
jcmvbkbc, 2015-08-13
@jcmvbkbc

Standing in master, execute git cherry-pick doc
However, it is unlikely that you need one last commit, perhaps you meant "the entire history of doc in one commit".
This can be done by running in master git merge --squash doc

E
evnuh, 2015-08-13
@evnuh

git-scm.com/docs/git-cherry-pick

S
Stanislav, 2015-08-13
@crackedmind

Why the last commit? if you merge regularly, then only he will be. The use case is not very clear.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question