Skip to content

Instantly share code, notes, and snippets.

View eimamura's full-sized avatar

Erielcio Stefano Imamura eimamura

View GitHub Profile
@eimamura
eimamura / git-branch.md
Last active April 21, 2026 17:20
git branch
git fetch --prune
git branch -vv
git branch -d feature/xxx
git push origin --delete feature/xxx
@eimamura
eimamura / git-fix.md
Created April 21, 2026 16:46
git fix folow

はい。整理できます。 このケースは、共有ブランチを rebase で無理やり整えるより、退避してから「正しい差分だけ移植」する方が安全です。git cherry-pick は既存コミットの変更を新しいコミットとして適用でき、git revert は既存コミットの効果を打ち消す新しいコミットを記録します。履歴確認には git log --graph、比較には git range-diff、隔離作業には git worktree が向いています。([Git][1])

まず結論

おすすめ方針はこれです。

  1. 全員の push / merge を止める
  2. 現状を退避
  3. main を正解の起点にする
@eimamura
eimamura / git.md
Created April 21, 2026 15:19
Git commands

Git Undo Commands – Practical Usage (Frequency-Based)

This list reflects common real-world usage, ordered by frequency and safety.


1. git revert

Safely undo a commit by creating a new commit that reverses the changes.

@eimamura
eimamura / tasks.json
Created April 21, 2026 14:16
Open Dev Terminals
{
"version": "2.0.0",
"tasks": [
{
"label": "Terminal 1",
"type": "shell",
"command": "bash",
"isBackground": true,
"presentation": {
"group": "dev",
@eimamura
eimamura / buildspec.yml
Last active July 8, 2024 12:24
buildspeck_python
version: 0.2
env:
variables:
AWS_DEFAULT_REGION: us-east-1
IMAGE_REPO_NAME: fastapi-deploy
IMAGE_TAG: latest
phases:
pre_build:
@eimamura
eimamura / python_venv.sh
Last active June 1, 2024 14:01
python venv
# Create a virtual environment
python -m venv venv
# Activate the virtual environment (Windows)
source venv/Scripts/activate
# Activate the virtual environment (Linux/Mac)
source venv/bin/activate
# Deactivate the virtual environment
@eimamura
eimamura / python_memory_used.py
Last active June 1, 2024 14:03
python memory used
not_my_data = set(dir())
# print(set(dir()) - set(dir(__builtins__)))
# print(my_data)
# eval('a')
# sys.getsizeof(1)
# sys.getsizeof([1,2,3,4,5])
mysum = 0