FAQ

IndexTagsArchivesAbout
  • Difference between git pull and git pull --rebase

    2023-01-03

    Question I started using git sometime back and do not fully understand the intricacies. My basic question here is to find out the difference between a git pull and git pull --rebase , since adding the --rebase option does not seem to do something very different : just does a pull. Please help me with understanding the difference. Answer git pull = git fetch + git merge against tracking upstream branch…

    #git

  • How to create file execute mode permissions in Git on Windows?

    2023-01-03

    Question I use Git in Windows, and want to push the executable shell script into git repo by one commit. Usually I need to do two steps (git commit). $ vi install.sh $ git add install.sh $ git commit -am "add new file for installation" # first commit [master f2e92da] add support for install.sh 1 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 install.sh $ git update-index --chmod=+x install.sh $ git commit -am "…

    #windows

  • Accidentally committed .idea directory files into git

    2023-01-02

    Question I have accidentally committed the .idea/ directory into git. This is causing conflicts everywhere else I need to checkout my repo. I was wondering how do I remove these files from the remote? I still need these files locally since the Intellij IDE needs them. I just don't want them in the remote. I have added the directory .idea/ to my .gitignore and committed and pushed this file into remote.…

    #git

  • Update Git submodule to latest commit on origin

    2023-01-02

    Question I have a project with a Git submodule. It is from an ssh://... URL, and is on commit A. Commit B has been pushed to that URL, and I want the submodule to retrieve the commit, and change to it. Now, my understanding is that git submodule update should do this, but it doesn't. It doesn't do anything (no output, success exit code). Here's an example: $ mkdir foo $ cd foo $ git init .…

    #git

  • What is the Sign Off feature in Git for?

    2023-01-02

    Question What's the point of the Sign Off feature in Git? git commit --signoff When should I use it, if at all? Answer Sign-off is a requirement for getting patches into the Linux kernel and a few other projects, but most projects don't actually use it. It was introduced in the wake of the SCO lawsuit, (and other accusations of copyright infringement from SCO, most of which they never actually took to court), as a Developers Certificate of Origin.…

    #git

  • How do I preview stash contents in Git?

    2023-01-01

    Question I want to inspect a stash and find out what changes it would make if I applied it to working tree in its current state. I know I can do a git diff on the stash, but this shows me all the differences between the working tree and the stash, whereas I'm just interested to know what the stash apply is going to change. Answer git stash show will show you the files that changed in your most recent stash.…

    #git

  • How to commit my current changes to a different branch in Git [duplicate]

    2023-01-01

    Question This question already has answers here: </div> How do I merge my local uncommitted changes into another Git branch? (10 answers) Closed 8 years ago. Sometimes it happens that I make some changes in my working directory, and I realize that these changes should be committed in a branch different to the current one. This usually happens when I want to try out new things or do some testing and I forget to create a new branch beforehand, but I don't want to commit dirty code to the master branch.…

    #git

  • «
  • 56
  • 57
  • 58
  • 59
  • 60
  • »

©2023 hugo-notepadium-mod

CC BY-NC-SA 4.0 | RSS

Powered by Hugo and the Notepadium-mod

^ TOP ^