Hong
Hong

Reputation: 18511

How to push a snapshot to a remote repository?

Sorry for this rudimentary question, but I have spent a lot of time searching for the answer online. I thought my scenario was simple and typical:

  1. An Android project Foo in Android Studio set up for GIT.
  2. A remote GIT server on a computer using Bonobo and repository Foo was created
  3. Added the remote repository (http://computername/Bonobo.Git.Server/Foo.git) to the project.

After Push, only a few files out of hundreds have been pushed to the remote repository. What I want is for the remote repository to have all the project files so that one can clone a copy of the project from the repository.
I must be missing something very simple and fundamental. I have been using SVN for a long time, and just started trying GIT.

Any tip will be greatly appreciated.

Upvotes: 2

Views: 1160

Answers (1)

user3159253
user3159253

Reputation: 17455

git doesn't push files, at all. git pushes commits: named entities, each with a given filetree, author, commit message and other attributes. So if you don't see expected files on a remote server after git push, then quite likely these files were missing in commit.

Add missing files to the index, amend the commit or make a new one, make sure, that all files are on their place inside the commit , and only then push

Since Android Studio is based on IntelliJ Idea, I hope that recipes for Idea would work. So here is the tutorial on how to add files to the index and here's the rest of the docs.

Upvotes: 1

Related Questions