Linux command
git-http-push 命令
网络
复制后可按需替换文件名、目录或参数。
常用示例
Push a branch via HTTP/DAV to a remote
git http-push [url] [refs]
Push all refs via HTTP to a remote
git http-push --all [url]
Dry run to see what would be pushed
git http-push --dry-run [url] [refs]
Force push via HTTP
git http-push --force [url] [refs]
Push with verbose output
git http-push --verbose [url] [refs]
说明
git http-push pushes objects and updates refs in a remote repository over HTTP/WebDAV. It is a low-level plumbing command used internally by git push when the remote uses the older DAV-based HTTP protocol. This command is rarely used directly. Modern HTTP Git servers use the smart HTTP protocol which is handled by git push automatically. The DAV-based push requires the remote server to have WebDAV write access enabled and is considered legacy.
参数
- --all
- Push all refs. Verifies all objects in the entire local ref history exist in the remote repository rather than assuming completeness.
- --force
- Allow updating a remote ref that is not an ancestor of the local ref (disables fast-forward check).
- --dry-run
- Do everything except actually send the updates.
- --verbose
- Report the list of objects being walked locally and the list of objects successfully sent to the remote repository.
- -d, -D
- Remove refs from the remote repository instead of pushing to them.
FAQ
What is the git-http-push command used for?
git http-push pushes objects and updates refs in a remote repository over HTTP/WebDAV. It is a low-level plumbing command used internally by git push when the remote uses the older DAV-based HTTP protocol. This command is rarely used directly. Modern HTTP Git servers use the smart HTTP protocol which is handled by git push automatically. The DAV-based push requires the remote server to have WebDAV write access enabled and is considered legacy.
How do I run a basic git-http-push example?
Run `git http-push [url] [refs]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --all do in git-http-push?
Push all refs. Verifies all objects in the entire local ref history exist in the remote repository rather than assuming completeness.