In GitHub for Windows, why can't I see all of my commits to the current branch in the current branch's history? - github-for-windows

I'm using the official GitHub for Windows client (http://windows.github.com/). I have been steadily committing changes to the branch "modeling-users", but I am unable to see many of my recent changes in the history for the current branch. I can see these commits by entering "git log" at the command prompt. I also looked at the commit history for this branch on the GitHub website. It shows the same incomplete commit history. Why isn't it showing all of my commits?
Image here: http://tinypic.com/r/maza7o/6

As anonymous user commented, GitHub for Windows can take time to reflect updates to repositories. The commits will eventually appear in GitHub for Windows.

Related

How to restore commit history before first release on Github

I have a repository where I made many commits in January. Fast forward to July, when I was tinkering with Git, I got to know about the Releases feature.
Since I had many major features to push, I decided to create a new release.
Now I need the January commits for showing to someone but there is no trace of them anywhere, neither in the Commits section nor in releases. It just shows 4 commits since this release
The commit history shows as if I started commiting to the repo from July only
Any help is appreciated.
Somehow, my entire history was stored not in branch but in a tag that I created when creating that release.
That's why even going too much deeper didn't reveal anythin since the commits were HEADless.
I noted the tag's hash and did
git checkout tag-hash // now no branch checked out
git checkout -b new-branch-name tag-hash // created new branch from that tag
And with this, my new branch has the whole commit history

Github Desktop says my own local branch is "a protected branch" and I can not commit to it. How do I remove this protection?

I forked a Project on GitHub and then opened my fork in GitHub Desktop (Windows 7). Locally, I created a branch and made changes to the code. Now I want to commit the changes, then publish the branch to my fork on GitHub, and then make a pull request to the original repo. That is how it used to work the last time I did this.
But now GitHub Desktop unasked protects this branch ("branch is a protected branch. Want to switch branches?"), and I can not commit things to it. On GitHub, in the settings of my fork, under "Manage Access", it says:
0 collaborators have access to this repository. Only you can
contribute to this repository.
But I can not do this (contribute to this repository).
How can I "unprotect" that branch and commit to it?
The solution was to first push the fresh branch without the commits to my fork at GitHub. After that the protection in GitHub Desktop disappeared, and I was able to locally commit changes to that branch and push them online.
I had to log off and log in once from within GitHub Desktop, to be able to push the branch, for security considerations, I had not logged in via Desktop for a while.

Github Site shows deleted commit in the commit tab

I am new to github commands and I am a bit confused about what I am doing.
I want to delete the "MegaMan Game" commit, revert all changes, and make it dissapear from github
history. Following this other stack overflow question Delete commits from a branch in Git, I ran the git reset --hard HEAD ~1 command. The commit seems to be deleted judging by the git log command, but on the github website it still shows that the "MegaMan Game" commit is still there. Also in source tree happens the same thing. The commit still shows there.
I am a bit confused. Is the website wrong about the commits? Did I run the command wrong?
Here is an image with the exact commands and what git
This is a noob question. I need help to undestand how this works.
You deleted commit in your local branch. You must send this change to the upstream branch(to github).
git push --force

Revert git repository to prior commit using Github GUI

While there is loads of information available on how to revert to a specific commit using the git command line - e.g. How to revert Git repository to a previous commit?
Is there a way to achieve same using the github gui? There is a feature to revert the latest commit. However I was unable to find options from the Commits history to revert to a specific commit in the list:
on the right and here is what we see:
so there is no feature shown here for Revert to this commit.
Jump to the PR which is included in the commit which is to be reverted. Go to conversation section, there you will see revert option in front of all commits included in that PR (screenshot)
You can press the button on the side < > (like in your first picture) and with this you can browse the repository at the time after this commit. Now you can create a pull request or you can download the repository at this very point in time.
I guess there is no other solution if you really want to achieve this in the browser. In GitHub desktop there is the Revert button for each of your commits (screenshot).

How to remove unsynced commits in github for windows?

I have two unsynced commits using GitHub (Windows), but don't want to commit them now. How can I revert or drop them?
As mentioned in "How to reach some commands on Github for windows", you best course of action would be to use to git CLI (command line interface), opening a shell from "GitHub for Windows", or using msysgit.
Then a git reset HEAD^2 (or even git reset --hard HEAD^2 if you really want to remove those files as well as any work in progress) would drop those commits (as in "How do I delete unpushed git commits?" or "How to delete a 'git commit'").
After a refresh, GitHub for Windows should display no more unsynced commit.
Other answers below mention the recent addition of "Undo most recent commit", which achieve the same reset:
As I mentioned in "GitHub undo a discard", the "discard changes" feature would achieve the same as a git reset.
In the newest version of GitHub (Windows) under the Settings button, next to the "Sync" icon/button there is the option "Undo most recent commit", that will take care of those unsynced commits.
Latest version of GitHUb for Windows have this option. The option will be enabled in case you have any unsynced commit. This is a very useful update from GitHub.
There is an undo button. Right click on the file to commit and select "Discard changes".
https://github.com/blog/1441-undo-button-in-github-for-windows
I would suggest, based on the way the questions is phrased, and what searches it comes up for, that people may want to use "FETCH_HEAD when resetting via the git CLI/ ("Open in Git Shell") in the GitHub for Windows menu.
Once in the shell, run:
git reset FETCH_HEAD --hard
This will reset you back to where you were when you last pulled down changes from your remote - which is what it seems like some people hitting this page are looking to do.