Linux command
legit 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Switch
git sw [branch]
Sync
git sync
Publish
git publish [branch]
Unpublish
git unpublish [branch]
Example
git branches [pattern]
Undo
git undo --hard
说明
legit is a complementary command-line interface for Git that simplifies common workflows. It adds commands for branch switching with automatic stashing, synchronization, and branch publishing. After installation, legit commands are available as Git subcommands (e.g., `git sw`, `git sync`).
参数
- sw BRANCH
- Switch to branch, stashing and restoring unstaged changes
- sync
- Synchronize current branch with remote (merge or rebase)
- publish BRANCH
- Push branch to remote server
- unpublish BRANCH
- Remove branch from remote server
- branches PATTERN
- List branches with publication status
- undo --hard
- Remove last commit from history
FAQ
What is the legit command used for?
legit is a complementary command-line interface for Git that simplifies common workflows. It adds commands for branch switching with automatic stashing, synchronization, and branch publishing. After installation, legit commands are available as Git subcommands (e.g., `git sw`, `git sync`).
How do I run a basic legit example?
Run `git sw [branch]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does sw BRANCH do in legit?
Switch to branch, stashing and restoring unstaged changes