corvo
corvo

Reputation: 724

Changes commited from Android Studio

I am committing changes from android studio into github and message appears that " succesfully committed 2 files ... ". But i cant see even a single change appearing on my repo on browser when I refresh it. Is there a way to know where those changes were committed?

Upvotes: 1

Views: 2013

Answers (3)

eva
eva

Reputation: 49

After you commit your project, open git cmd.

Next write your project directory e.g. cd AndroidStudioProjects\MyApp

Finally execute push, then you can see your changes in github web.

Upvotes: 0

Peter Reid
Peter Reid

Reputation: 5407

In git (and other distribution version control systems or DVCS), there is the concept of a 'local' and a 'remote' repository. You have only commited to your local repository, and not yet 'synced' to the remote repository (GitHub) - hence your changes are not yet displayed on GitHub.

Specifically in Git you create a commit against your local repository, and then you need to push your commit(s) to your remote repository (GitHub). For further reading see 'Syncing' at atlassian.com.

Pushing in Android Studio

To do this in Android Studio from the top menu choose VCS then Git then Push to bring up the 'Push commits dialog', review the information presented and press Push to push to GitHub.

See the IntelliJ IDEA documentation for more information (Android Studio is based on IntelliJ IDEA Community Edition).


Pushing from the CLI

To do this from the Git command line, execute

git push {remote-name} {branch-name}

In the vast majority of cases, your remote name will be origin as this is the default, to push to the master branch you can execute

git push origin master

For reference, see the documentation.

Upvotes: 2

Rohit Shedage
Rohit Shedage

Reputation: 25850

It is because you have committed file but have not pushed them.

In git commit and push is different. You need to push your changes in order to see them in repo

Upvotes: 0

Related Questions