FAQ

IndexTagsArchivesAbout
  • What does Bump Version stand for?

    2023-05-07

    Question I saw this comment in git many times. What does it mean actually? Answer It means to increment the version number to a new, unique value.

    #git

  • Git: How do I list only local branches?

    2023-05-06

    Question git branch -a shows both remote and local branches. git branch -r shows remote branches. Is there a way to list just the local branches? Answer Just git branch without options. From the manpage: With no arguments, existing branches are listed and the current branch will be highlighted with an asterisk.

    #git

  • How to apply `git diff` patch without Git installed?

    2023-05-06

    Question How can my client apply patch created by git diff without git installed? I have tried to use patch command but it always asks file name to patch. Answer git diff > patchfile and patch -p1 < patchfile work but as many people noticed in comments and other answers patch does not understand adds, deletes and renames. There is no option but git apply patchfile if you need handle file adds, deletes and renames.…

    #git

  • Make the current Git branch a master branch

    2023-05-06

    Question I have a repository in Git. I made a branch, then did some changes both to the master and to the branch. Then, tens of commits later, I realized the branch is in much better state than the master, so I want the branch to "become" the master and disregard the changes on master. I cannot merge it, because I don't want to keep the changes on master. What should I do?…

    #git

  • Git Cherry-pick vs Merge Workflow

    2023-05-03

    Question Assuming I am the maintainer of a repo, and I want to pull in changes from a contributor, there are a few possible workflows: I cherry-pick each commit from the remote (in order). In this case git records the commit as unrelated to the remote branch. I merge the branch, pulling in all changes, and adding a new "conflict" commit (if needed). I merge each commit from the remote branch individually (again in order), allowing conflicts to be recorded for each commit, instead of grouped all together as one.…

    #git

  • git undo all uncommitted or unsaved changes

    2023-05-03

    Question I'm trying to undo all changes since my last commit. I tried git reset --hard and git reset --hard HEAD after viewing this post. I responds with head is now at 18c3773... but when I look at my local source all the files are still there. What am I missing? Answer This will unstage all files you might have staged with git add: git reset This will revert all local uncommitted changes (should be executed in repo root):…

    #git

  • How can I recover a lost commit in Git?

    2023-05-03

    Question First, got "your branch is ahead of origin/master by 3 commits" then my app has reverted to an earlier time with earlier changes. How can I get what I spent the last 11 hours doing back? Answer git reflog is your friend. Find the commit that you want to be on in that list and you can reset to it (for example:git reset --hard e870e41). (If you didn't commit your changes.…

    #git

  • «
  • 21
  • 22
  • 23
  • 24
  • 25
  • »

©2023 hugo-notepadium-mod

CC BY-NC-SA 4.0 | RSS

Powered by Hugo and the Notepadium-mod

^ TOP ^