0

I have commited every times in the local repository and now I want to push all my commits in the remote repository. Should I do any special action or is it enough if I do a commit and push?

Example: I have done the Commit1 Commit2 and Commit3. Now I want to commit again (Commit4) and push all my commits (Commit1, Commit2, Commit3 and the current Commit4). With Commit and push are the last commits also pushed?

3
  • Yes. A commit always comes with its complete history. Commented Oct 20, 2017 at 11:46
  • 2
    In fact you don't push commit per commit but you push a branch. if you didn't create any then you should have a default one named "master" Commented Oct 20, 2017 at 11:51
  • I understand, thanks! Commented Oct 20, 2017 at 11:54

1 Answer 1

2

You only need to push the most recent commit, all of the previous commits will be pushed with it.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for the info!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.