Is there a one-character alias for `--restack` in ...
# how-do-i
z
Is there a one-character alias for
--restack
in
gt submit
? It appears not. Can you please make
-k
an alias for
--restack
? When I
gt submit
, it totally messes up my flow when I realize nothing has happened and my terminal says "are you sure you want to restack?" I've often switched branches and am doing something else! So I always use
gt submit -s --restack
but it's pretty verbose. Any shortcuts for that besides a bash alias?
p
(If applicable) To help us more clearly understand what you're trying to do, please provide additional details about: - Screenshots / debug logs / list of commands you've tried to run so far - Your workflow - Current state
Hey Zach, im afraid there isnt an shorter way to do this besides the flag but you can also alias your gt submit to do this.
t
@Zach S graphite has an aliases feature built-in, no bash alias required:
Copy code
$ cat ~/.config/graphite/aliases

# Edit this file to configure aliases for Graphite commands.
# If you delete this file, it will be recreated with the default aliases.
# The first word of each line is the alias, and the rest is the command.
# Lines starting with # are ignored.

# The aliases for ss, ls, and ll are defined by default and must be overridden to be disabled.
# They are shown below to demonstrate the formatting.

ls log short
ll log long
ss submit --stack --ignore-out-of-sync-trunk
s submit --ignore-out-of-sync-trunk
yolo submit --no-interactive --ignore-out-of-sync-trunk --publish
yolom submit --no-interactive --ignore-out-of-sync-trunk --publish --merge-when-ready
yolod submit --no-interactive --ignore-out-of-sync-trunk --draft
➕ 1
👍 1
z
Thank you, I edited the default
Copy code
ss submit --stack
to
Copy code
ss submit --stack --restack
💫 1