Category: Git

how to filter git-branch by author

Query asked by user How can I list branches filter by (last) author name? For example, I want to get only main and mybranch by filtering “yukihane” from following repository. * commit 9315faf698c4f733e96047ffe65a636330a4edc1 (origin/others, others) | Author: other <[email¬†protected]> | Date: Tue Apr 19 09:00:50 2022 +0900 | | others | | * commit c37b840649c71080eb0705e6800f359a22c1183a […]

Posted in Git

sed: can’t read ../../build.gradle: No such file or directory

Query asked by user I am new to git and github. I am working on a project where I need to commit my changes to github repository in a specific branch. But I am getting the error $ git commit 3.5.0.1 s/3.5.0.1/3.5.1.1/g sed: can’t read ../../build.gradle: No such file or directory I have also attached […]

Posted in Git

How can I set the default branch name for all new projects on GitLab?

Query asked by user Note that I am not looking to change it for a specific repo. I want to change the default branch name per account, so any new created repository will have this as default branch. Currently the default is ‘main’, some time ago it was ‘master’. See Set default name for default […]

Posted in Git

brew install Error: Command failed with exit 129: git

Query asked by user Whenever I try to run brew to install a package I receive this error: Unknown option: -C usage: git [–version] [–help] [-c name=value] [–exec-path[=<path>]] [–html-path] [–man-path] [–info-path] [-p|–paginate|–no-pager] [–no-replace-objects] [–bare] [–git-dir=<path>] [–work-tree=<path>] [–namespace=<name>] <command> [<args>] Error: Command failed with exit 129: git Im trying to install by using this command: brew […]

Posted in Git

For untracked file I get error: Please commit your changes or stash them before you switch branches

Query asked by user [email¬†protected] ~/c $ git status On branch fix_typos_and_do_small_improvements Changes to be committed: (use “git restore –staged <file>…” to unstage) new file: dancer/_global/t/lib/Global/Test/Routes.pm Untracked files: (use “git add <file>…” to include in what will be committed) Utils.pm [email¬†protected] ~/c $ git checkout check_responses_from_backend error: Your local changes to the following files would […]

Posted in Git

How do I open git-bash.exe from command prompt such that it executes “git status” automatically and waits for the next command instead of exiting

Query asked by user How can I create a git-bash shortcut which opens git-bash.exe and automatically runs “git status” and/or “git worktree list” at startup and then waits for my next command(s). I have tried: “.\git-bash.exe” -c “git status” but the git-bash window closes immediately after executing git status “.\git-bash.exe” -c “git status;read”, but this […]

Posted in Git

How to resolve conflict while merging branch automatically? in GitLab? do you want a yaml script, a CI action recipe, or just the git command?

Query asked by user If I merge two branch.It shows, Merge blocked: merge conflicts must be resolved If I give resolve conflicts ENTRYPOINT [“java”,”-Dspring.profiles.active=**development**”,”-jar”,”/app/integration-service.jar”] ENTRYPOINT [“java”,”-Dspring.profiles.active=**stage**”,”-jar”,”/app/integration-service.jar”] kind: Deployment metadata: name: integration-app namespace: stellacenter-**dev** namespace: stellacenter-**stage-uat** labels: app: integration-app spec: kind: Service metadata: name: integration-service namespace: stellacenter-**dev** namespace: stellacenter-**stage-uat** spec: type: NodePort selector: It is the […]

Posted in Git

How to cherry-pick merge commits?

Query asked by user I need to cherry pick a range of commits, where I found commits like this: Merge “TICKET-100: Some commit message” into master < some other commits > TICKET-100: Some commit message I checked the content and its the same for both commits. Can I only cherry pick the first, and ignore […]

Posted in Git

Differential backups of git repositories using git bundle

Query asked by user I would like to know if it is possible to do differential backups of a git repository, using git bundle like this: First time: git clone –mirror https://github.com/me/myrepo git bundle create base.bundle –all Every time I want to create a differential bundle: cd myrepo git fetch –all # is this necessary? […]

Posted in Git