gerrit의git 설정 프로세스
1. 환경 변수 설정
git config --global user.name "qujunorz"
git config --global user.email "[email protected]"
#gerrit
[remote "gerrit"]
url = ssh://qujunorz@$ url
fetch = +refs/heads/*:refs/remotes/gerrit/*
#!/bin/sh
# From Gerrit Code Review 2.7
#
# Part of Gerrit Code Review (
#
# Copyright (C) 2009 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.#unset GREP_OPTIONS
CHANGE_ID_AFTER="Bug|Issue"MSG="$1"
# Check for, and add if missing, a unique Change-Id
#
add_ChangeId() {
clean_message=`sed -e '
/^diff --git a\/.*/{
s///
q
}
/^Signed-off-by:/d
/^#/d
' "$MSG" | git stripspace` if test -z "$clean_message"
then
return
fi
# Does Change-Id: already exist? if so, exit (no change).
if grep -i '^Change-Id:' "$MSG" >/dev/null
then
return
fi
id=`_gen_ChangeId`
T="$MSG.tmp.$$"
AWK=awk if [ -x /usr/xpg4/bin/awk ]; then
# Solaris AWK is just too broken
AWK=/usr/xpg4/bin/awk
fi
# How this works:
# - parse the commit message as (textLine+ blankLine*)*
# - assume textLine+ to be a footer until proven otherwise
# - exception: the first block is not footer (as it is the title)
# - read textLine+ into a variable
# - then count blankLines
# - once the next textLine appears, print textLine+ blankLine* as these
# aren't footer
# - in END, the last textLine+ block is available for footer parsing
$AWK '
BEGIN {
# while we start with the assumption that textLine+
# is a footer, the first block is not.
isFooter = 0
footerComment = 0
blankLines = 0
}
# Skip lines starting with "#" without any spaces before it.
/^#/ { next }
# Skip the line starting with the diff command and everything after it,
# up to the end of the file, assuming it is only patch data.
# If more than one line before the diff was empty, strip all but one.
/^diff --git a/ {
blankLines = 0
while (getline) { }
next
}
# Count blank lines outside footer comments
/^$/ && (footerComment == 0) {
blankLines++
next
}
# Catch footer comment
/^\[[a-zA-Z0-9-]+:/ && (isFooter == 1) {
footerComment = 1
}
/]$/ && (footerComment == 1) {
footerComment = 2
}
# We have a non-blank line after blank lines. Handle this.
(blankLines > 0) {
print lines
for (i = 0; i "$T" && mv "$T" "$MSG" || rm -f "$T"}_gen_ChangeIdInput() { echo "tree `git write-tree`"
if parent=`git rev-parse "HEAD^0" 2>/dev/null` then
echo "parent $parent"
fi
echo "author `git var GIT_AUTHOR_IDENT`"
echo "committer `git var GIT_COMMITTER_IDENT`"
echo
printf '%s' "$clean_message"}_gen_ChangeId() {
_gen_ChangeIdInput |
git hash-object -t commit --stdin
}
add_ChangeId
KexAlgorithms +diffie-hellman-group1-sha1
2. 코드 업로드 작업
git clone $ gerrit
git branch -a
#
git branch -r
#
git branch [branch_name]
##
git checkout [branch_name]
git branch , git checkout -b
git checkout -b [branch_name]
touch aecho “revise” >a
git add a
# ,
git addgit commit -a
#
git commit --amend
# , , git commit --amend 。
git status
#
commitgit log
#
git-review master
3. 오보
sign_and_send_pubkey: signing failed: agent refused operation
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rightsand the repository exists.
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
Heroku H10/503 오류 해결 방법 - 이야기오후 2시 30분까지 내 이해 수준에 따라 배포할 준비가 된 내 코드 를 완성했습니다. 몇 달 전에 플랫폼에 Node.js 앱을 배포하여 을 따르기로 결정했습니다. How to solve Heroku H10 erro...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.