Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 57 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,60 @@

.idea/

.vscode/
.vscode/

# Created by https://www.toptal.com/developers/gitignore/api/emacs
# Edit at https://www.toptal.com/developers/gitignore?templates=emacs

### Emacs ###
# -*- mode: gitignore; -*-
*~
\#*\#
/.emacs.desktop
/.emacs.desktop.lock
*.elc
auto-save-list
tramp
.\#*

# Org-mode
.org-id-locations
*_archive

# flymake-mode
*_flymake.*

# eshell files
/eshell/history
/eshell/lastdir

# elpa packages
/elpa/

# reftex files
*.rel

# AUCTeX auto folder
/auto/

# cask packages
.cask/
dist/

# Flycheck
flycheck_*.el

# server auth directory
/server/

# projectiles files
.projectile

# directory configuration
.dir-locals.el

# network security
/network-security.data


# End of https://www.toptal.com/developers/gitignore/api/emacs
53 changes: 53 additions & 0 deletions gitflow.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#!/bin/bash

# Prompt for GitHub username
read -p "Enter your GitHub username: " GITHUB_USER

# Clone the forked repository
echo "Cloning forked repository..."
git clone [email protected]:$GITHUB_USER/getnighthawk.git
cd getnighthawk || { echo "Failed to enter repo directory"; exit 1; }

# Add upstream remote
echo "Adding upstream remote..."
git remote add upstream https://github.com/layer5io/getnighthawk.git

# Verify remotes
echo "Verifying remotes..."
git remote -v

# Fetch upstream
echo "Fetching upstream..."
git fetch upstream

# Show branches
echo "Listing branches..."
git branch -va

# Checkout master and merge upstream
echo "Updating local master branch..."
git checkout master
git merge upstream/master

# Prompt for branch type and name
echo "Creating a new branch for your work..."
read -p "Enter branch type (feature/bug): " BRANCH_TYPE
read -p "Enter issue number or short name: " BRANCH_NAME

NEW_BRANCH="$BRANCH_TYPE/$GITHUB_USER/$BRANCH_NAME"

git checkout master
git branch "$NEW_BRANCH"
git checkout "$NEW_BRANCH"

echo "You are now on branch: $NEW_BRANCH"
echo "Make your changes, commit, and push when ready."

# Instructions for rebasing before PR
echo "When ready to submit a PR, run:"
echo " git fetch upstream"
echo " git checkout master"
echo " git merge upstream/master"
echo " git checkout $NEW_BRANCH"
echo " git rebase master"
echo "Optionally squash commits with: git rebase -i master"