Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use git commit -s with Ungit? #1482

Open
chintan-mishra opened this issue May 24, 2021 · 1 comment
Open

How to use git commit -s with Ungit? #1482

chintan-mishra opened this issue May 24, 2021 · 1 comment

Comments

@chintan-mishra
Copy link

chintan-mishra commented May 24, 2021

When contributing to a repo that enforces DCO then I have to switch to CLI for committing the changes, as Ungit cannot auto-fill the Sign-Off block in the commit message

This might be happening due to alias section in ~/.gitconfig file not getting recognized/parsed. Read more below.

I used this resource to set up git for contributing to repos with DCO.

However, when committing using Ungit, it is expected that the following block will be included

Sgned-off by: FirstName LastName <fname@domain.tld>

But that is not the case. Sign-off doesn't get included.

So, I switched to CLI to test if git is honoring the ~/.gitconfig at all. Here is what I did.

$ git add .
$ git commit

Commits using CLI had the Sign-Off block in the commit message.

How to set up git and Ungit to automatically contain Sign-off block while committing?

@chintan-mishra
Copy link
Author

Here is the concerned output log obtained from ungit --logGitCommands

{"message":"git result (first 400 bytes): -c color.ui=false -c core.quotepath=false -c core.pager=cat -c core.editor=: log --cc --decorate=full --show-signature --date=default --pretty=fuller -z --branches --tags --remotes --parents --no-notes --numstat --date-order --max-count=100 --skip=0\n\ncommit c97fb2bb852af4b37fb0c811a3e59ff101265822 d8c6f414ac09f19e237139f71aef3235ae7699b7 (HEAD -> refs/heads/master)\nAuthor:     Chintan \"greenz1\" Mishra <chintan@rebhu.com>\nAuthorDate: Mon May 24 16:13:35 2021 +0530\nCommit:     Chintan \"greenz1\" Mishra <chintan@rebhu.com>\nCommitDate: Mon May 24 16:13:35 2021 +0530\n\n    Commit 2\n\n0\t0\ttemp1\u0000\u0000commit d8c6f414ac09f19e237139f71aef3235ae7699b7\nAuthor:  ","level":"info","timestamp":"2021-05-24T10:43:36.409Z"}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant