how do i override local files with current version on github? - github

I generated and destroyed a scaffold, generated a new scaffold, which resulted in a huge mess, such as the CSS (nav fonts are not correct, buttons have a hover yet nothing was specified in the file originally). The "description" field did not appear with the new scaffold and more. I have gone through the new scaffold files and have spent hours to only prefer to have the current version I pushed override the local files and start over from that point.
Is there a way to download the last version i pushed to github to override the current local files and start from there? I have not committed any of the current changes.

you can "undo" your changes in git very easily with the reset command.
git reset HEAD --hard
will force remove all your changes to the state they were in the HEAD revision.

Related

Github Desktop Commit to master button greyed out if more than one change slected

I have a lot of stuff that I want to add to github so I have the desktop version to make local changes. I add everything I have and before I can push it I have to commit to master, problem is I have 1100 changes and I can only commit one at a time if more than one is selected with pretty much any combination of different files but the button remains greyed out if I have more than 1 file selected.

How to add storyboard canvas orientation in git ignore in Xcode

I know this seems really obvious question but I have gone through a lot of different git ignore files but still I am unable to control this one file.
What is the issue?
How it occurred?
I just changed the one view controller's position in the storyboard.
What I need?
Any possible way to add this file into git ignore so that I can avoid these simple merge conflicts? Also, I cannot add this storyboard into git ignore because I want to reflect the changes in View Controllers which I actually made. On my previous macbook, it was working fine, no idea why the same git ignore is not working anymore?
Because it's showing "Changes not staged for commit" rather than something about untracked files, what this means is that you have Main.storyboard already being tracked by Git. In other words, as soon as you add a file to Git and commit it, that file becomes tracked, meaning that Git will be monitoring it for changes.
.gitignore does not work for tracked files, but rather only untracked files. You can use
git rm --cached Nava/UI/Base.lproj/Main.storyboard
to remove it from the index, and then commit that. Now, if you have the .gitignore file properly set up to ignore that file, you won't see it coming up anymore.

Eclipse EGit Not Opening File Comparison

I am using Eclipse (Photon 4.8.0) for a Git project. Before committing, I have been double clicking the files which appear in the unstaged changes section of the Git Staging View to remind myself of what I have changed before writing the commit message (I'm still new to Git so occasionally I will do several things before remembering that I have to commit my changes). However, double clicking on the file today merely opens the file, rather than opening the comparison view. I can still open the comparison view by right clicking the file and selecting Compare with Index but this takes more time and is frustrating.
As far as I know, I haven't changed any settings (not intentionally anyway). Can someone explain to me how to get back the behaviour I was seeing before please?
Make sure, in the Git Staging view toolbar the Compare Mode button is pressed.
See also EGit User Guide of the History view with the same icon.

List all commits affecting a subdirectory in github

Is there a way in GitHub to list all commits that affects a subdirectory (i.e. anyfile or directory in its hierarchy), without having to check out the entire repo?
Just to clarify, you are not looking for the latest change, but all changes made to a folder in a branch. Because latest change is always visible on the grayish bar:
All changes made to the folder can be checked by clicking the History button right above the area I have circled with red. That ends up at this page: https://github.com/jonasblunck/ccm/commits/master/installation which is filtered for that folder. Compare it with https://github.com/jonasblunck/ccm/commits/master that contains all commits to master.

ECLIPSE Subclipse: Occasional error with file selection in synchronize view

I am using Eclipse JUNO with the subclipse plugin.
Generally it works quite well. To commit files to the SVN repository you synchronize to check the changes you have made. Select the files you want to commit, add a comment and simply commit it.
Usually the selected files are then properly committed.
However, sometimes the selected files view in the commit window do not correspond to the actually selected files in the synchronize view. Instead it simply indicates all files in the project's file directory.
If you don't notice and commit you end up committing dozens of files/directories you do not want or need to commit.
I have tried all sorts of things to try and make it do that so that I know which chain of actions triggers it so I can avoid it but of course it never does it when you try.
Does anyone have any suggestions as to what might be causing it or experienced the same? It is definitely not that the selected files are no longer selected. I could clearly see that selection still being active on the left hand side synchronization view but still the commit window was showing a full file selection.
Any help/suggestion much appreciated.
I finally figured it out. Whatever file selection you do is overridden by a folder selection at a higher level => if you accidentally mark the project's main folder all files are transferred.
In the end it is Very simple and logical. The only nuisance is that the specific files you selected at a lower level are highlighted in the commit window's file selection view as well so if you look at the view superficially you get the impression only your selected files will be committed.