Documentation
¶
Index ¶
- func AddRemote(repoDir, remoteName, url string) error
- func Clone(url, targetDir string) error
- func GetRemoteURL() (string, error)
- func GetRemoteURLFromDir(dir string) (string, error)
- func GetRepoRoot() (string, error)
- func Push(repoDir string) error
- func RemoveRemote(repoDir, remoteName string) error
- type RemoteInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRemoteURL ¶
GetRemoteURL retrieves the git remote URL from the current directory
func GetRemoteURLFromDir ¶ added in v0.1.1
GetRemoteURLFromDir retrieves the git remote URL from the specified directory. If dir is empty, it uses the current directory.
func GetRepoRoot ¶
GetRepoRoot returns the root directory of the git repository
func RemoveRemote ¶
RemoveRemote removes a git remote
Types ¶
type RemoteInfo ¶
RemoteInfo contains parsed information from a git remote URL
func ParseRemoteURL ¶
func ParseRemoteURL(remoteURL string) (*RemoteInfo, error)
ParseRemoteURL parses a git remote URL and extracts the owner and repository name Supports formats: - SSH: git@github.com:owner/repo.git - HTTPS: https://github.com/owner/repo.git - HTTPS (no .git): https://github.com/owner/repo
Click to show internal directories.
Click to hide internal directories.