B
B
befart2019-08-23 04:54:42
git
befart, 2019-08-23 04:54:42

How to push all commits?

I found that I did not push commits to github, except for the first one. Worked in the Android Studio interface, not from the command line. First, I shared the project on github, then the first commit appeared there, and the MainActivity.java file. When I added the following commits, I pressed the Commit button, instead of Commit and Push. When I discovered this, I tried to push it, and the last commit seems to have pushed, but nothing has changed dramatically on the github, most of the project files are missing there. How to fix this and transfer the project to github? Is it possible to just delete the project from github and re-share it correctly from the Studio, or are there any other ways to fix it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
SagePtr, 2019-08-23
@SagePtr

Are the branch you committed to, the branch you pushed, and the branch you see on github exactly the same? (by default the master branch, but maybe you changed it somewhere)

B
befart, 2019-08-24
@befart

Thanks to everyone who responded. On your advice, I tried to figure out what I have with the branches. It turns out that the latest commits have flown out of the master branch, i.e. Here is what the Version Control logs say:
for the first commit - In 3 branches: HEAD, master, origin/master
for most project commits - In 2 branches: HEAD, master
for the latest - In 1 branch: HEAD.
Accordingly, the question is how to drive the last 8 commits into the master branch?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question