I had somewhere in my Git repository a line containing word "Foo" a couple hundreds commits before.
If there is any way to find its revision number where it was the last time without buying FishEye?
I read that Git mainly add informations about the repository's history, trying to remember every change made, but that there are also commands that make irreversible changes.
What are the commands that I should really pay attention to and avoid to use wrongly because there is not turning back?
Is there any way I can repair my repository with commit history in tact.
# git log
fatal: object 01aeb2bf2e93b238f0e0422816b3e55518321ae7 is corrupted
From reading the link below it looks like I'll have zap it and start over.
http://www.miek.nl/s/7e76eadefe/
I have a .gitignore file in my project directory and I placed the following entry in the file to not to commit the files in the following folder:
EStudyMongoDb.Integration.Test\
For some reason Git pushed the files to repository anyway!
Anyway! now I want to remove those files that have been pushed to the repository but I don't want to loose my local changes to the files inside the folder. How can I do that?
I accidentially discard my changes on files in my local working tree via git checkout. The files aren't staged at this time. Is it posible to "undo" this checkout?
I accidentally committed my development.sqlite3 file to Git, and it seems to be slowing down my commits. I know about .gitignore, but does this take the file out of my repository once I've done so? My concern is is with reducing the commit and push times.
How can I view the change history of an individual file, complete with what has changed ?
I have got as far as : git log -- filename
which shows me the commit history of the file, but how do I get at the content of each of the changes ?
Thanks - I'm trying to make the transition from MS SourceSafe and that used to be a simple right click / show history.
This morning we pull from our repo, and git put us on (no branch).
I don't understand this, why did this happen? And how get out of it without losing our changes?
With subversion I could use tortieseSVN to view the history/log of a file.
How can I do this with git?
Just looking for history record for a particular file, and then the ability to compare the different versions.
I'm relatively new to Git, and want to get advice on best practices for deleting branches.
After I've created and merged a branch back into master, should I leave it hanging around for historical purposes, or should I delete it as soon as it's no longer needed for housekeeping purposes?
I've been wondering what is the better DVCS for .NET developers? From reading various information it has sounded like Mercurial works better on Windows, but other information claims that Git has caught up and surpassed Mercurial in offering quality Windows and Visual Studio tools. Does anyone have good recent information or experience with trying both in a .NET development environment?
I've done 'git pull', and received a merge conflict. I know that the other version of the file is good, and that mine is bad (all my changes should be abandoned). How do I do this?
unmerged: _widget.html.erb
You are in the middle of a conflicted merge.
I work on Linux all the time and I'm clueless about Windows not even having one to try it, is Git nowadays working on Windows? or am I making problems for my Windows-pals by using it?
Hi,
I have generated a public key, private key pair.
I've set the public key to the site.
How to use the console in windows to clone a git repository?
What do I do with the private key?
I keep getting: the remote end hung up unexp.
Thanks
I merged the wrong way between two branches. I then ran the following:
git reset --hard HEAD^
I am now back at the previous commit (which is where I want to be). Was that the correct thing to do?
The bad commit is still in the repository, is that okay or should I do something else to remove it from the repository?
I have not pushed or committed anything else yet.
I am aware of this question, but it is a bit old now, and some of the answers seem outdated.
Question: please write one answer per GUI you have used, including pros and cons (for example, as far as I can tell, with git gui, you can't manage the stash).
I'd like to make my local repo point to a different fork of the same project. Will this work?
Do a merge with the 'target origin'
Change the origin repo in my config file to the 'target origin'
Also, if my local repo is not entirely identical to the new origin (say, I've resolved some merge conflicts in my favor), will these changes be pushed to the new origin when I do a git push, or will only commits made after the change of origin get pushed?
When doing a git rebase, I often have difficulty working out what is happening with the 'local' and 'remote' when resolving conflicts. I sometimes have the impression that they swap sides from one commit to the next.
This is probably (definitely) because I still haven't properly understood.
When rebasing, who is 'local' and who is 'remote'?
(I use P4Merge for resolving conflicts)
Hi,
I'm trying to figure how can I use git for multiple environments (dev-test-prod) with code promotion. I read a bit about branching but didn't understand much how can this solve my problem since I must have the ability to run all of the environments concurrently and separately from each other.
Will be very thankful for some kind of how-to.
Now that I have nginx setup I need to be able to hide my .git directories. What kind of rewrite would I need to stop prying eyes? And where in the server {} or http {} block would it go?
Is there a git command to add differences within a range of line-numbers to the index?
I want to be able to select lines in my editor and run a macro to add any changes in the selection to the index.
Hi.
I want to use Git to backup my home drive, but I also want to use it as a version control system for projects that will be stored in my home drive.
How would I go about doing that? Do I .gitignore all the projects root folders and make new repositories for them?
Hi,
I am working on origin:abc remote repository . I want to update the origin:def repository in the remote repository in git. Can some please give me command for this?