FAQ

IndexTagsArchivesAbout
  • Cleaning up old remote git branches

    2022-09-25

    Question I work from two different computers (A and B) and store a common git remote in the dropbox directory. Let's say I have two branches, master and devel. Both are tracking their remote counterparts origin/master and origin/devel. Now while on computer A, I delete branch devel, on local and remote. git push origin :heads/devel git branch -d devel Running git branch -a on computer A, I get the following list of branches.…

    #git

  • How do you stash an untracked file?

    2022-09-25

    Question I have changes to a file, plus a new file, and would like to use git stash to put them away while I switch to another task. But git stash by itself stashes only the changes to the existing file; the new file remains in my working tree, cluttering up my future work. How do I stash this untracked file? Answer To stash your working directory including untracked files (especially those that are in the .…

    #git

  • Getting the difference between two repositories

    2022-09-24

    Question How can we get the difference between two git repositories? The scenario: We have a repo_a and repo_b. The latter was created as a copy of repo_a. There have been parallel development in both the repositories afterwards. Is there a way we can list the differences of the current versions of these two repositories? Answer In repo_a: git remote add -f b path/to/repo_b.git git remote update git diff master remotes/b/master git remote rm b

    #git

  • How can I delete all of my Git stashes at once?

    2022-09-24

    Question How can I delete all of my Git stashes at once? Specifically I mean, with typing in one command. Answer The following command deletes all your stashes: git stash clear From the git documentation: clear Remove all the stashed states. IMPORTANT WARNING: Those states will then be subject to pruning, and may be impossible to recover (...).

    #git

  • Resolve conflicts using remote changes when pulling from Git remote

    2022-09-24

    Question I'm trying to pull code from my GitHub repo onto my server, but the pull keeps failing because of merge conflicts. I don't want to keep any of the changes that may have occurred on my local server since the last pull. So is there a way I can force Git to overwrite with whatever version is in GitHub, rather than bother me about conflicts? Answer If you truly want to discard the commits you've made locally, i.…

    #git

  • Should I add the Visual Studio 2015 .vs folder to source control?

    2022-09-24

    Question Visual Studio 2015 creates a new folder called ".vs". What is the purpose of it and should I add it to source control? Answer No, you should not add it to source control. The purpose of this folder is to move machine- and user-specific files to a central location. The explanation on the Visual Studio User Voice issue explains it well: So far, we have moved the .SUO file and the VB/C# compiler IntelliSense database files to the new location.…

    #git

  • Definition of "downstream" and "upstream"

    2022-09-23

    Question I've started playing with Git and have come across the terms "upstream" and "downstream". I've seen these before but never understood them fully. What do these terms mean in the context of SCMs (Software Configuration Management tools) and source code? Answer In terms of source control, you're downstream when you copy (clone, checkout, etc) from a repository. Information flowed "downstream" to you. When you make changes, you usually want to send them back "…

    #git

  • «
  • 81
  • 82
  • 83
  • 84
  • 85
  • »

©2023 hugo-notepadium-mod

CC BY-NC-SA 4.0 | RSS

Powered by Hugo and the Notepadium-mod

^ TOP ^