FAQ

IndexTagsArchivesAbout
  • How to use Git and Dropbox together? [closed]

    2022-10-30

    Question Closed. This question needs details or clarity. It is not currently accepting answers. </div> Closed 2 years ago. 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> Is it possible to use Git and Dropbox together? Answer I think that Git on Dropbox is great. I use it all the time. I have multiple computers (two at home and one at work) on which I use Dropbox as a central bare repository.…

    #git

  • Reset local repository branch to be just like remote repository HEAD

    2022-10-30

    Question How do I reset my local branch to be just like the branch on the remote repository? I tried: git reset --hard HEAD But git status claims I have modified files: On branch master Changes to be committed: (use "git reset HEAD <file>..." to unstage) modified: java/com/mycompany/TestContacts.java modified: java/com/mycompany/TestParser.java Answer Setting your branch to exactly match the remote branch can be done in two steps: git fetch origin git reset --hard origin/master If you want to save your current branch's state before doing this (just in case), you can do:…

    #git

  • How do I merge changes to a single file, rather than merging commits?

    2022-10-29

    Question I have two branches (A and B) and I want to merge a single file from branch A with a corresponding single file from Branch B. Answer I came across the same problem. To be precise, I have two branches A and B with the same files but a different programming interface in some files. Now the methods of file f, which is independent of the interface differences in the two branches, were changed in branch B, but the change is important for both branches.…

    #git

  • How does git store files?

    2022-10-29

    Question I just started learning git and to do so I started reading the Git Community Book, and in this book they say that SVN and CVS store the difference between files and that git stores a snapshot of all the files. But I didn't really get what they mean by snapshot. Does git really make a copy of all the files in each commit? Because that's what I understood from their explanation.…

    #git

  • The remote end hung up unexpectedly while git cloning

    2022-10-29

    Question My git client repeatedly fails with the following error after trying to clone the repository for some time. What could be the issue here? Note: I have registered my SSH key with the GIT hosting provider Receiving objects: 13% (1309/10065), 796.00 KiB | 6 KiB/s fatal: The remote end hung up unexpectedly Answer Quick solution: With this kind of error, I usually start by raising the postBuffer size by:…

    #git

  • Undoing a git rebase

    2022-10-28

    Question How do I easily undo a git rebase? A lengthy manual method is: checkout the commit parent to both of the branches create and checkout a temporary branch cherry-pick all commits by hand reset the faulty rebased branch to point to the temporary branch In my current situation, this works because I can easily spot commits from both branches (one was my stuff, the other was my colleague's stuff). However, my approach strikes me as suboptimal and error-prone (let's say I had just rebased with two of my own branches).…

    #git

  • How to sparsely checkout only one single file from a git repository?

    2022-10-27

    Question How do I checkout just one file from a git repo? Answer Originally, I mentioned in 2012 git archive (see Jared Forsyth's answer and Robert Knight's answer), since git1.7.9.5 (March 2012), Paul Brannan's answer: git archive --format=tar --remote=origin HEAD:path/to/directory -- filename | tar -O -xf - But: in 2013, that was no longer possible for remote https://github.com URLs. See the old page "Can I archive a repository?" The current (2018) page "…

    #git

  • «
  • 71
  • 72
  • 73
  • 74
  • 75
  • »

©2023 hugo-notepadium-mod

CC BY-NC-SA 4.0 | RSS

Powered by Hugo and the Notepadium-mod

^ TOP ^