git-notes

Find commit with specific git note

只愿长相守 提交于 2019-12-24 00:57:07
问题 I use git notes in my repository. Sometimes I need to find a commit with note that includes given string. So far I was using this command: git log --show-notes=* --grep="PATTERN" --format=format:%H The problem here is that this prints every commit SHA with PATTERN, even if it's not in notes only in commit message. Is there a better way for that? 回答1: There is a placeholder for notes in the format string, %N . I don't know how to print the notes in one line, so I use a loop to test notes of

How to use git metadata strategies compared to ClearCase ones?

我是研究僧i 提交于 2019-12-07 12:58:08
问题 In my previous developer life, clearcase was the tool, during 10+ years, for version control. Now the organisation I work for have moved over to git since 4 years. In clearcase there are easy accessible metadata constructions such as attributes on all levels of items such as repositories OR branches OR labels. git notes exists, but after some web surfing I have not come across any clear good way of doing this efficiently and why. For example UCM ClearCase baseline promotion level is a good

How to use git metadata strategies compared to ClearCase ones?

让人想犯罪 __ 提交于 2019-12-06 03:49:28
In my previous developer life, clearcase was the tool, during 10+ years, for version control. Now the organisation I work for have moved over to git since 4 years. In clearcase there are easy accessible metadata constructions such as attributes on all levels of items such as repositories OR branches OR labels. git notes exists, but after some web surfing I have not come across any clear good way of doing this efficiently and why. For example UCM ClearCase baseline promotion level is a good concept that I wish would be as simple in git. The development community stats I represent for this

Is there a way to automatically merge notes if commits for those notes get squashed?

大城市里の小女人 提交于 2019-12-04 11:54:02
问题 For example: git commit -am "Something" git notes append -m "Dark " git commit -am "Something" git notes append -m "Side" git rebase -i # now I squash two commits and I expect to see "Dark Side" here # but it show that note is undefined git notes show 回答1: The problem is almost certainly your config; assuming you have otherwise default config, you need to set the notes.rewriteRef option to refs/notes/commits for this to work. The magic command you need is thus: git config notes.rewriteRef

git: How to delete a local ref branch?

社会主义新天地 提交于 2019-11-30 12:30:35
问题 I have bit of a difficulty in deleting a local ref branch(refs/notes/origin/commits). I was able to delete the branch(refs/notes/origin/commits) in the remote repository using the command git push origin :refs/notes/origin/commits but when i try to delete the same branch on my local repository, i get the below error [User@centos Clone]# git branch -rd refs/notes/origin/commits error: remote branch 'refs/notes/origin/commits' not found. Any suggestions? 回答1: Just do git branch -d commits to

git: How to delete a local ref branch?

折月煮酒 提交于 2019-11-30 02:54:38
I have bit of a difficulty in deleting a local ref branch(refs/notes/origin/commits). I was able to delete the branch(refs/notes/origin/commits) in the remote repository using the command git push origin :refs/notes/origin/commits but when i try to delete the same branch on my local repository, i get the below error [User@centos Clone]# git branch -rd refs/notes/origin/commits error: remote branch 'refs/notes/origin/commits' not found. Any suggestions? Just do git branch -d commits to delete the local branch. Use the -D switch to delete it irrespective of its merged status. Use git update-ref