This will work (tested with zsh and bash):
[alias] chs = !git checkout $1 && git status
More Related Contents:
- Git alias with positional parameters
- How do I alias commands in git?
- Is it possible to override git command by git alias?
- How to embed bash script directly inside a git alias
- Pass an argument to a Git alias command
- Define git alias with the same name to shadow original command
- List Git aliases
- Remove sensitive files and their commits from Git history
- After $git push -u origin main command, Git bash is not requesting any authentication literally does nothing
- How to store a git config as part of the repository?
- How can I move a tag on a git branch to a different commit?
- git-diff to ignore ^M
- How can I see which Git branches are tracking which remote / upstream branch?
- How to bridge git to ClearCase?
- Git, rewrite previous commit usernames and emails
- Revert a range of commits in git
- How can I move a directory in a Git repo for all commits?
- What is a dangling commit and a blob in a Git repository and where do they come from?
- How do I use `git rebase -i` after `git merge` without messing things up?
- git 2.32 git push -u origin master Nothing happens
- git commit frequency
- How does git handle folder permission?
- How to rebase one Git repository onto another one?
- How do I change case of the names of multiple files, already committed?
- Git submodules and ssh access
- How do I fix “remote: fatal error in commit_refs” errors trying to push with Git?
- How can I rename a git stash?
- Where does Git store files?
- Git push error: RPC failed; result=56, HTTP code = 200 fatal: The remote end hung up unexpectedly fatal
- How to find last git commit before a merge