FAQ

IndexTagsArchivesAbout
  • What is the difference between pull and clone in git?

    2022-10-08

    Question What is the difference between doing (after mkdir repo and cd repo): git init git remote add origin git://github.com/cmcculloh/repo.git git fetch --all git pull origin master and git clone git://github.com/cmcculloh/repo.git I mean, obviously one is shorter, but other than that are they basically doing the same thing? Answer git clone is how you get a local copy of an existing repository to work on. It's usually only used once for a given repository, unless you want to have multiple working copies of it around.…

    #git

  • Git error on git pull (unable to update local ref)

    2022-10-07

    Question I only have a master branch and I'm getting this error every time I try to git pull: error: Couldn't set refs/remotes/origin/master From /var/lib/git/xxx/project ! a0f80ea..49177a3 master -> origin/master (unable to update local ref) And when I run git pull origin master I get: error: Couldn't set ORIG_HEAD fatal: Cannot update the ref 'ORIG_HEAD'. I have been searching but can't find why. Answer My team and I ran into this error, unable to update local ref, when doing a pull in SourceTree.…

    #git

  • Git, rewrite previous commit usernames and emails

    2022-10-07

    Question I've committed a bunch of commits to a project on Github, however I realized I hadn't set up the proper email and committer full name on the computer I'm currently using to make my commits and therefore the users avatar and email address are not there. How can I rewrite all past commit email and usernames? Answer You can add this alias: git config --global alias.change-commits '!'"f() { VAR=\$1; OLD=\$2; NEW=\$3; shift 3; git filter-branch --env-filter \"…

    #git

  • Is there any way to git checkout previous branch?

    2022-10-07

    Question I sort of want the equivalent of cd - for git. If I am in branch master and I checkout foo, I would love to be able to type something like git checkout - to go back to master, and be able to type it again to return to foo. Does anything like this exist? Would it be hard to implement? Answer From the release notes for 1.6.2 @{-1} is a way to refer to the last branch you were on.…

    #git

  • Please enter a commit message to explain why this merge is necessary, especially if it merges an updated upstream into a topic branch

    2022-10-07

    Question I am using Git. I did a pull from a remote repo and got an error message: Please enter a commit message to explain why this merge is necessary, especially if it merges an updated upstream into a topic branch. I try to type a message and press Enter but nothing happens. How do I tell Git/Terminal I am done typing in my message? I am using Terminal on OS X.…

    #macos

  • "Large data" workflows using pandas [closed]

    2022-10-06

    Question Closed. This question is seeking recommendations for books, tools, software libraries, and more. It does not meet Stack Overflow guidelines. It is not currently accepting answers. </div> We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations. Closed 1 year ago. The community reviewed whether to reopen this question 1 year ago and left it closed:…

    #python

  • Find size of Git repository

    2022-10-06

    Question What's a simple way to find the size of my Git repository? And I don't mean du -h on the root directory of my repository. I have a lot of ignored files, so that size would be different from my total repository size. I essentially want to know how much data would be transferred upon cloning my repository. Answer Note that, since git 1.8.3 (April, 22d 2013): "git count-objects" learned "…

    #git

  • «
  • 76
  • 77
  • 78
  • 79
  • 80
  • »

©2023 hugo-notepadium-mod

CC BY-NC-SA 4.0 | RSS

Powered by Hugo and the Notepadium-mod

^ TOP ^