gitea/modules/git
Rob Gonnella c9e7fde8b3
feat: adds option to force update new branch in contents routes (#35592)
Allows users to specify a "force" option in API /contents routes when
modifying files in a new branch. When "force" is true, and the branch
already exists, a force push will occur provided the branch does not
have a branch protection rule that disables force pushing.

This is useful as a way to manage a branch remotely through only the
API. For example in an automated release tool you can pull commits,
analyze, and update a release PR branch all remotely without needing to
clone or perform any local git operations.

Resolve #35538

---------

Co-authored-by: Rob Gonnella <rob.gonnella@papayapay.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-10-06 21:23:14 -07:00
..
attribute Move git command to git/gitcmd (#35483) 2025-09-15 23:33:12 -07:00
foreachref Allow foreachref parser to grow its buffer (#35365) 2025-08-28 10:18:54 +00:00
gitcmd Move git command to git/gitcmd (#35483) 2025-09-15 23:33:12 -07:00
internal
languagestats Fix context usages (#35348) 2025-08-27 11:00:01 +00:00
pipeline Move git command to git/gitcmd (#35483) 2025-09-15 23:33:12 -07:00
tests/repos
url
batch_reader.go Move git command to git/gitcmd (#35483) 2025-09-15 23:33:12 -07:00
batch.go
blame_sha256_test.go
blame_test.go
blame.go Move git command to git/gitcmd (#35483) 2025-09-15 23:33:12 -07:00
blob_gogit.go
blob_nogogit.go
blob_test.go Remove wrong "git.DefaultContext" (#35364) 2025-08-27 16:31:21 +00:00
blob.go Add support for 3D/CAD file formats preview (#34794) 2025-06-30 16:12:25 +08:00
cmdverb.go
commit_convert_gogit.go
commit_info_gogit.go Fix repo file list partial reloading for submodules (#35183) 2025-07-31 09:34:51 +08:00
commit_info_nogogit.go Fix repo file list partial reloading for submodules (#35183) 2025-07-31 09:34:51 +08:00
commit_info_test.go Remove wrong "git.DefaultContext" (#35364) 2025-08-27 16:31:21 +00:00
commit_info.go Fix repo file list partial reloading for submodules (#35183) 2025-07-31 09:34:51 +08:00
commit_reader.go Refactor commit reader (#34542) 2025-05-27 16:49:05 +00:00
commit_sha256_test.go Remove wrong "git.DefaultContext" (#35364) 2025-08-27 16:31:21 +00:00
commit_submodule_file_test.go Fix various bugs (#35177) 2025-07-30 07:08:59 +00:00
commit_submodule_file.go Fix various bugs (#35177) 2025-07-30 07:08:59 +00:00
commit_submodule.go Fix submodule nil check (#35096) 2025-07-16 12:07:38 +00:00
commit_test.go Remove wrong "git.DefaultContext" (#35364) 2025-08-27 16:31:21 +00:00
commit.go Move git command to git/gitcmd (#35483) 2025-09-15 23:33:12 -07:00
config_submodule_test.go
config_submodule.go
config_test.go Move git command to git/gitcmd (#35483) 2025-09-15 23:33:12 -07:00
config.go Move git command to git/gitcmd (#35483) 2025-09-15 23:33:12 -07:00
diff_test.go Run gopls modernize on codebase (#34751) 2025-06-18 01:48:09 +00:00
diff.go Move git command to git/gitcmd (#35483) 2025-09-15 23:33:12 -07:00
error.go feat: adds option to force update new branch in contents routes (#35592) 2025-10-06 21:23:14 -07:00
git_test.go Fix context usages (#35348) 2025-08-27 11:00:01 +00:00
git.go Move git command to git/gitcmd (#35483) 2025-09-15 23:33:12 -07:00
grep_test.go Remove wrong "git.DefaultContext" (#35364) 2025-08-27 16:31:21 +00:00
grep.go Move git command to git/gitcmd (#35483) 2025-09-15 23:33:12 -07:00
hook.go Address some CodeQL security concerns (#35572) 2025-10-04 01:21:26 +08:00
key.go Fix SSH signing key path will be displayed in the pull request UI (#35381) 2025-09-12 03:00:18 +00:00
last_commit_cache_gogit.go
last_commit_cache_nogogit.go
last_commit_cache.go Run gopls modernize on codebase (#34751) 2025-06-18 01:48:09 +00:00
log_name_status.go Move git command to git/gitcmd (#35483) 2025-09-15 23:33:12 -07:00
notes_gogit.go
notes_nogogit.go
notes_test.go Remove wrong "git.DefaultContext" (#35364) 2025-08-27 16:31:21 +00:00
notes.go
object_format.go
object_id_gogit.go
object_id_test.go
object_id.go
parse_gogit_test.go
parse_gogit.go
parse_nogogit_test.go
parse_nogogit.go
parse.go
README.md
ref_test.go
ref.go Run gopls modernize on codebase (#34751) 2025-06-18 01:48:09 +00:00
remote.go Move git command to git/gitcmd (#35483) 2025-09-15 23:33:12 -07:00
repo_base_gogit.go Remove wrong "git.DefaultContext" (#35364) 2025-08-27 16:31:21 +00:00
repo_base_nogogit.go Remove wrong "git.DefaultContext" (#35364) 2025-08-27 16:31:21 +00:00
repo_blob_gogit.go
repo_blob_nogogit.go
repo_blob_test.go Remove wrong "git.DefaultContext" (#35364) 2025-08-27 16:31:21 +00:00
repo_blob.go
repo_branch_gogit.go
repo_branch_nogogit.go Move git command to git/gitcmd (#35483) 2025-09-15 23:33:12 -07:00
repo_branch_test.go Remove wrong "git.DefaultContext" (#35364) 2025-08-27 16:31:21 +00:00
repo_branch.go Move some functions to gitrepo package (#35503) 2025-09-26 10:14:20 -07:00
repo_commit_gogit.go Move updateref and removeref to gitrepo and remove unnecessary open repository (#35511) 2025-09-19 08:04:18 -07:00
repo_commit_nogogit.go Move updateref and removeref to gitrepo and remove unnecessary open repository (#35511) 2025-09-19 08:04:18 -07:00
repo_commit_test.go Remove wrong "git.DefaultContext" (#35364) 2025-08-27 16:31:21 +00:00
repo_commit.go Move git command to git/gitcmd (#35483) 2025-09-15 23:33:12 -07:00
repo_commitgraph_gogit.go
repo_commitgraph.go Move git command to git/gitcmd (#35483) 2025-09-15 23:33:12 -07:00
repo_compare_test.go Move updateref and removeref to gitrepo and remove unnecessary open repository (#35511) 2025-09-19 08:04:18 -07:00
repo_compare.go Move some functions to gitrepo package (#35503) 2025-09-26 10:14:20 -07:00
repo_gpg.go Move git command to git/gitcmd (#35483) 2025-09-15 23:33:12 -07:00
repo_hook.go
repo_index.go Move git command to git/gitcmd (#35483) 2025-09-15 23:33:12 -07:00
repo_object.go Move git command to git/gitcmd (#35483) 2025-09-15 23:33:12 -07:00
repo_ref_gogit.go
repo_ref_nogogit.go Move git command to git/gitcmd (#35483) 2025-09-15 23:33:12 -07:00
repo_ref_test.go Remove wrong "git.DefaultContext" (#35364) 2025-08-27 16:31:21 +00:00
repo_ref.go Move git command to git/gitcmd (#35483) 2025-09-15 23:33:12 -07:00
repo_stats_test.go Remove wrong "git.DefaultContext" (#35364) 2025-08-27 16:31:21 +00:00
repo_stats.go Move git command to git/gitcmd (#35483) 2025-09-15 23:33:12 -07:00
repo_tag_gogit.go Remove the duplicated function GetTags (#35375) 2025-08-29 01:11:42 +00:00
repo_tag_nogogit.go Remove the duplicated function GetTags (#35375) 2025-08-29 01:11:42 +00:00
repo_tag_test.go Remove the duplicated function GetTags (#35375) 2025-08-29 01:11:42 +00:00
repo_tag.go Move git command to git/gitcmd (#35483) 2025-09-15 23:33:12 -07:00
repo_test.go Move GetDiverging functions to gitrepo (#35524) 2025-09-26 15:15:42 +00:00
repo_tree_gogit.go Move git command to git/gitcmd (#35483) 2025-09-15 23:33:12 -07:00
repo_tree_nogogit.go
repo_tree.go Move git command to git/gitcmd (#35483) 2025-09-15 23:33:12 -07:00
repo.go Move archive function to repo_model and gitrepo (#35514) 2025-10-06 15:01:26 -07:00
signature_gogit.go
signature_nogogit.go
signature_test.go
signature.go
submodule_test.go Move git command to git/gitcmd (#35483) 2025-09-15 23:33:12 -07:00
submodule.go Move git command to git/gitcmd (#35483) 2025-09-15 23:33:12 -07:00
tag_test.go
tag.go
tree_blob_gogit.go
tree_blob_nogogit.go Follow file symlinks in the UI to their target (#28835) 2025-07-01 06:55:36 +08:00
tree_blob.go
tree_entry_common_test.go Remove wrong "git.DefaultContext" (#35364) 2025-08-27 16:31:21 +00:00
tree_entry_gogit.go Follow file symlinks in the UI to their target (#28835) 2025-07-01 06:55:36 +08:00
tree_entry_mode.go Follow file symlinks in the UI to their target (#28835) 2025-07-01 06:55:36 +08:00
tree_entry_nogogit.go Follow file symlinks in the UI to their target (#28835) 2025-07-01 06:55:36 +08:00
tree_entry_test.go Follow file symlinks in the UI to their target (#28835) 2025-07-01 06:55:36 +08:00
tree_entry.go Follow file symlinks in the UI to their target (#28835) 2025-07-01 06:55:36 +08:00
tree_gogit.go Follow file symlinks in the UI to their target (#28835) 2025-07-01 06:55:36 +08:00
tree_nogogit.go Move git command to git/gitcmd (#35483) 2025-09-15 23:33:12 -07:00
tree_test.go Remove wrong "git.DefaultContext" (#35364) 2025-08-27 16:31:21 +00:00
tree.go Move git command to git/gitcmd (#35483) 2025-09-15 23:33:12 -07:00
utils_test.go Fix various bugs (#35177) 2025-07-30 07:08:59 +00:00
utils.go Move git command to git/gitcmd (#35483) 2025-09-15 23:33:12 -07:00

Git Module

This module is merged from https://github.com/go-gitea/git which is a Go module to access Git through shell commands. Now it's a part of gitea's main repository for easier pull request.