NullVoxPopuli / NullVoxPopuli/dotfiles

Git scripts

Open
#7 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
CSS
Stars
40
Forks
7
PR merge metrics
No merged PRs in 30d

Description

most recent git branches

git for-each-ref \
  --sort=committerdate refs/heads/ \
  --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))'

"stat" since "time"

 git diff $(git rev-list -n1 --before="2 months ago" main) --shortstat
automated git rebase (needs testing)
#!/bin/bash
set -e

Color_Off='\033[0m'
Yellow='\033[0;33m'

target=${1:-master}
branch=$(git describe --contains --all HEAD)

if [[ "$target" == *"$branch"* ]]; then
  echo -e "${Yellow}Your current branch is the target branch. Aborting.${Color_Off}"
  exit 1;
fi

echo ""
echo -e "${Yellow}Rebasing $branch on top of $target${Color_Off}"
echo ""

echo -e "${Yellow}Updating Origin...${Color_Off}"
git fetch origin

echo -e "${Yellow}Updating $target Branch...${Color_Off}"
git checkout $target
git reset origin/$target --hard

echo -e "${Yellow}Rebasing...${Color_Off}"
git checkout $branch
git rebase $target

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the Git command snippets and the bash rebase script in the issue. No repository file, test, or specific change is named, so first determine whether these commands are intended as documentation or an executable script. Done would require an agreed scope and documented location for the final material.

Written by the indexing model from the issue text.

Assessment

Tech stack
bash, git
Domain
cli, tooling
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.