commits not showing up on github

After a git commit you need to push the changes

git push origin master to push in master branch

git push origin branch_name to push in secondary branch

Complete work flow for a branch:

git checkout -b aosp_in_docker //checkout a branch and switch into it
git branch // to check all branches current branch will have * sign
git status //to check status of file
git add .  //add untraced files
git commit -a -m 'added a docker container'
git push origin aosp_in_docker // push changes
git staus // check if success

When you created the repository on GitHub you selected initializes remotely containing a README.md file. The next step would be to run git clone https://github.com/username/repo.git in your terminal. At this point you have a local copy on the GitHub repository, so you would then move in your project files. Run git add * then git commit -m 'first commit' then git push origin master. Your changes should now be visible on GitHub.


After your Github repository has been created (i.e. you can view it on Github), then you should already have:

1. Local repository set up:

git init

2. README file created and added to the repository:

touch README.md
git add README.md 
git commit -m 'first commit'

3. A remote called origin linked to your repository:

git remote add origin https://github.com/username/repo.git

4. An initial push, which copied your local README to your Github repository:

git push -u origin master

If you can view your repository on Github, then it has been successfully created. In this case it looks like you may have edited your README file on Github using the online editing tools, which caused your remote and local branches to diverge.

Before you can push your local changes to Github, you need to fetch or pull your remote changes, merge the changes locally (merging is automatic with pull), and then push to the remote.

See Pro Git: Fetching and Pulling from Your Remotes

Tags:

Git

Github