Say I make a bunch of changes to my files locally, then add these changes to the staging index and then commit them. Then I realise that actually, I’ve made some mistakes, and I want to quickly undo that whole commit and get back to where I was right before I committed (ie with my […]
I finished to commit and push changes on remote git repository but when I view remote repository’s files, these are outdated. I’m using Git Bash. View image The red text are changes made in repositories clones. These changes aren’t reflected in the original repository’s physical file How I can do to reflect the changes?
I’m doing a : git diff –diff-filter=AM –name-only 59ade6e..c1fc4d8 The 59ade6e hash is a commit where I added all my files (my first commit). But when I execute my command it seems that it doesn’t contain these added files. How can really include my hash revision to this diff ?
I want to allow some collaborators on one of my github repos, however I would like to limit them to their own Branch. There’s only a handful of collaborators, and limiting them to their own branch would prevent erroneous commits/push’s to the wrong branch. Is there a way to do this? Am I going about […]
I am working on a local branch VISS. Then I decided to check out a previous commit: git checkout 98ea3c8042c39e I made some important changes to the code. and then I committed again. Now I need to go back to my branch VISS keeping these changes. What should I do if I want to: Go […]
I have a website on a server and I want to begin sharing my work and so I am working with git. I am very new to it. So on the remote server, I made a “git init” and a git commit to move all the work on the .git directory (always on the remote […]
Me and a friend are creating an app for facebook. So to keep organized, when we do something and push it to heroku, we add a comment to the commit command such as: git commit -am “changed logo” The problem we’re having is that in the heroku website, in the activity log, we get messages […]
I committed some code and pushed it to my github account.Then ,I modified the code on my machine.I did not add it to the index or commit it.Now I want to remove all those modifications and make the code on my machine the same as what I committed earlier..I am somewhat confused by the various […]
I have a requirement to prepend “ticket:N” to commit messages, where N is the number of the ticket I’m working on. But I keep forgetting about the prefix and remember about it only 5-6 commits later, so –amend won’t help. Is it possible to set some warning, so git will warn me every time I […]
I’ve made some changes to my local version of the code and committed them, but I want to push them to a new branch. I’m worried that when I push my changes, they’ll all affect the master branch. Is it a problem that I’ve “committed” my changes? Or will those commits only be applied to […]