FAQ

IndexTagsArchivesAbout
  • Rebase feature branch onto another feature branch

    2022-09-15

    Question I have two (private) feature branches that I'm working on. a -- b -- c <-- Master \ \ \ d -- e <-- Branch1 \ f -- g <-- Branch2 After working on these branches a little while I've discovered that I need the changes from Branch2 in Branch1. I'd like to rebase the changes in Branch2 onto Branch1. I'd like to end up with the following: a -- b -- c <-- Master \ d -- e -- f -- g <-- Branch1 I'm pretty sure I need to rebase the second branch onto the first, but I'm not entirely sure about the correct syntax and which branch I should have checked out.…

    #git

  • Can I make fast forwarding be off by default in git?

    2022-09-14

    Question I can't really ever think of a time when I would use git merge rather than git rebase and not want to have a commit show up. Is there any way to configure git to have fast forwarding off by default? The fact that there's an --ff option would seem to imply that there's a way, but I can't seem to find it in the documentation. Answer It seems there is still a pending question in the thread: How to do it globally (i.…

    #git

  • Git command to show which specific files are ignored by .gitignore

    2022-09-14

    Question I am getting my feet wet with Git and have the following issue: My project source tree: / | +--src/ +----refs/ +----... | +--vendor/ +----... I have code (currently MEF) in my vendor branch that I will compile there and then move the references into /src/refs which is where the project picks them up from. My issue is that I have my .gitignore set to ignore *.dll and *.pdb. I can do a git add -f bar.…

    #git

  • How can I see the changes in a Git commit?

    2022-09-14

    Question When I do git diff COMMIT I see the changes between that commit and HEAD (as far as I know), but I would like to see the changes that were made by that single commit. I haven't found any obvious options on diff / log that will give me that output. Answer To see the diff for a particular COMMIT hash, where COMMIT is the hash of the commit:…

    #git

  • How can I see what I am about to push with git?

    2022-09-14

    Question Is there a way to see what would be pushed if I did a git push command? What I'm picturing is something like the "Files Changed" tab of Github's "pull request" feature. When I issue a pull request, I can look and see what will be pulled in if they accept my pull request: Command line is OK, but I'd prefer some sort of GUI (like the screenshot above).…

    #git

  • Why is Git better than Subversion?

    2022-09-14

    Question Locked. This question and its answers are locked because the question is off-topic but has historical significance. It is not currently accepting new answers or interactions. </div> I've been using Subversion for a few years and after using SourceSafe, I just love Subversion. Combined with TortoiseSVN, I can't really imagine how it could be any better. Yet there's a growing number of developers claiming that Subversion has problems and that we should be moving to the new breed of distributed version control systems, such as Git.…

    #svn

  • How can I see what has changed in a file before committing to git?

    2022-09-13

    Question I've noticed that while working on one or two tickets, if I step away, I'm not sure what I worked on, what changed, etcetera. Is there a way to see the changes made for a given file before git add and then git commit? Answer You're looking for git diff --staged Depending on your exact situation, there are three useful ways to use git diff: Show differences between index and working tree; that is, changes you haven't staged to commit: git diff [filename] Show differences between current commit and index; that is, what you're about to commit (--staged does exactly the same thing, use what you like): git diff --cached [filename] Show differences between current commit and working tree: git diff HEAD [filename] git diff works recursively on directories, and if no paths are given, it shows all changes.…

    #git

  • «
  • 86
  • 87
  • 88
  • 89
  • 90
  • »

©2023 hugo-notepadium-mod

CC BY-NC-SA 4.0 | RSS

Powered by Hugo and the Notepadium-mod

^ TOP ^