FAQ

IndexTagsArchivesAbout
  • Differences between git submodule and subtree

    2022-01-06

    Question What are the conceptual differences between using git submodule and subtree? What are the typical scenarios for each? Answer submodule is link; subtree is copy

    #git

  • Where is the global git config data stored?

    2022-01-06

    Question When using git config --global to set things up, to which file will it write? Example: git config --global core.editor "blah" I can't find it at these places: C:\Program Files\Git\etc\gitconfig C:\myapp.git\config I have not set an ENV? My Git version: 1.6.5.1.1367.gcd48 – on Windows 7 Answer Update 2016: with git 2.8 (March 2016), you can simply use: git config --list --show-origin And with Git 2.26 (Q1 2020), you can add a --show-scope option…

    #git

  • How to retrieve a single file from a specific revision in Git?

    2022-01-05

    Question I have a Git repository and I'd like to see how some files looked a few months ago. I found the revision at that date; it's 27cf8e84bb88e24ae4b4b3df2b77aab91a3735d8. I need to see what one file looks like, and also save it as a ("new") file. I managed to see the file using gitk, but it doesn't have an option to save it. I tried with command-line tools, the closest I got was:…

    #git

  • How to resolve "Error: bad index – Fatal: index file corrupt" when using Git

    2022-01-04

    Question After git init, I added and committed a few files, made some changes, added and committed. Set up the git daemon (running under Cygwin on WinXP) and cloned the repository once. Now, I get this error with the cloned repository: $ git status error: bad index file sha1 signature fatal: index file corrupt Is there any way to fix this, other than getting a new copy of the repository?…

    #git

  • Untrack files from git temporarily

    2022-01-04

    Question I have setup a local git on my machine. When I initialized git, I added pre-compiled libs and binaries. However, now during my development I don't want to check in those files intermittently. I dont want to remove these files from repo. Is there any way to not keep a track of these files till I complete my development. (I think I can not use .gitignore as it works only for those files which are not in git.…

    #git

  • Your configuration specifies to merge with the from the remote, but no such ref was fetched.?

    2022-01-04

    Question I am getting this error for pull: Your configuration specifies to merge with the ref 'refs/heads/feature/Sprint4/ABC-123-Branch' from the remote, but no such ref was fetched. This error is not coming for any other branch.The special thing about this branch is that it is created from the previous commit of another branch. My config file looks like: [core] repositoryformatversion = 0 filemode = false bare = false logallrefupdates = true symlinks = false ignorecase = true hideDotFiles = dotGitOnly [remote "…

    #git

  • Remove tracking branches no longer on remote

    2022-01-03

    Question Is there a simple way to delete all tracking branches whose remote equivalent no longer exists? Example: Branches (local and remote) master origin/master origin/bug-fix-a origin/bug-fix-b origin/bug-fix-c Locally, I only have a master branch. Now I need to work on bug-fix-a, so I check it out, work on it, and push changes to the remote. Next I do the same with bug-fix-b. Branches (local and remote) master bug-fix-a bug-fix-b origin/master origin/bug-fix-a origin/bug-fix-b origin/bug-fix-c Now I have local branches master, bug-fix-a, bug-fix-b.…

    #git

  • «
  • 156
  • 157
  • 158
  • 159

©2023 hugo-notepadium-mod

CC BY-NC-SA 4.0 | RSS

Powered by Hugo and the Notepadium-mod

^ TOP ^