Альтернативы Git "svn info", которые можно включить в сборку для отслеживания?
Чтобы завершить ответ Чарльза, вы git-commands также можете создать сценарий, отображающий git "sn info" как информацию, например git this one (уже mentioned there)
#!/bin/bash
# author: Duane Johnson
# email: duane.johnson@gmail.com
# date: 2008 Jun 12
# license: MIT
#
# Based on discussion at http://kerneltrap.org/mailarchive/git/2007/11/12/406496
pushd . >/dev/null
# Find base of git directory
while [ ! -d .git ] && [ ! `pwd` = "/" ]; do cd ..; done
# Show various information about this git directory
if [ -d .git ]; then
echo "== Remote URL: `git remote -v`"
echo "== Remote Branches: "
git branch -r
echo
echo "== Local Branches:"
git branch
echo
echo "== Configuration (.git/config)"
cat .git/config
echo
echo "== Most Recent Commit"
git --no-pager log -n1
echo
echo "Type 'git log' for more commits, or 'git show' for full commit details."
else
echo "Not a git repository."
fi
popd >/dev/null
В результате получится git-commands что-то вроде:
== Remote URL: origin git@github.com:canadaduane/my-project.git
== Remote Branches:
origin/work
trunk
trunk@1309
trunk@2570
trunk@8
== Local Branches:
master
* work
== Configuration (.git/config)
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[svn-remote "svn"]
url = svn+ssh://svn.my-project.com/srv/svn
fetch = my-project/trunk:refs/remotes/trunk
[remote "origin"]
url = git@github.com:canadaduane/my-project.git
fetch = refs/heads/*:refs/remotes/origin/*
[github]
user = canadaduane
repo = my-project
== Most Recent Commit
commit b47dce8b4102faf1cedc8aa3554cb58d76e0cbc1
Author: Duane Johnson
Date: Wed Jun 11 17:00:33 2008 -0600
Added changes to database schema that will allow decentralization from content pointers table
type 'git log' for more, or 'git show' for full commit details.
git
2021-12-22T13:48:43+00:00
2022-11-11T07:09:21+00:00
Tanoki
Вопросы с похожей тематикой, как у вопроса:
Альтернативы Git "svn info", которые можно включить в сборку для отслеживания?
Предупреждение о файлах Cookies
Мы используем файлы cookies для улучшения работы сайта. Оставаясь на нашем сайте, вы соглашаетесь с условиями использования файлов cookies. Чтобы ознакомиться с нашими Положениями о конфиденциальности и об использовании файлов cookie, нажмите здесь.