Comments (12)
Yes option 2 looks very good, so I think this will be the approach we take.
from dscr-for-vmware.
i support that too.
from dscr-for-vmware.
Yes, I also think it is a good idea to have it in the project. We will start working on it.
from dscr-for-vmware.
Could you please provide more information on the requested template - the template should contain only the line specified above or to be like this for example:
git add .
git commit -s -m "<commit message>"
git push origin <branch>
from dscr-for-vmware.
I was thinking of adding the following to the .gitconfig file
[commit]
template = ~/.gitmessage
And then in ~/.gitmessage
Signed-off-by: Your Name <[email protected]>
from dscr-for-vmware.
Ok, looks good this way !
from dscr-for-vmware.
So the content of ~/.gitmessage should look like this ?
Signed-off-by: git config --global user.name git config --global user.email
from dscr-for-vmware.
There are a couple of ways of doing this.
- When you are using VSC it is a preference, nothing required in git.
{
"git.alwaysSignOff": true
}
- When you are not using VSC, you can use a git hook, which can be a PowerShell script.
These 2 files go into the .git\hooks folder.
The .sh to call PowerShell, named prepare-commit-msg
#!/bin/sh
c:/Windows/System32/WindowsPowerShell/v1.0/powershell.exe -ExecutionPolicy Bypass -Command '.\.git\hooks\prepare-commit-msg.ps1'
and a .ps1 script, named prepare-commit-msg.ps1.
$commitText = @'
<Your commit title>
<Your commit details>
Date: $(Get-Date -Format 'ddd dd/MM/yyyy')
Time: $(Get-Date -Format 'HH:mm')
Signed-off-by: $($env:GIT_AUTHOR_NAME) <$($env:GIT_AUTHOR_EMAIL)>
'@
Set-Content -Path .\.git\COMMIT_EDITMSG -Value ($ExecutionContext.InvokeCommand.ExpandString($commitText))
- Also in git, you can use the git config option commit.template. This config option points to a template file. Both files are located in the .git folder in the repo.
File .git\config
[commit]
template = ./.git/templatefile.txt
The template itself, named templatefile.txt here. This contains static text (I have not found how to introduce git environment variables in here).
<Enter commit message>
<Enter commit details>
Signed-off-by: LucD <[email protected]>
In summary, option 1) is the easiest, but requires you use VSC.
Option 2) and 3) are editor independent, where I personally prefer option 2) since it can be customised.
from dscr-for-vmware.
Another solution to the problem is to use the following template:
git add .
git commit -s -m <Your commit message>
git push origin <Your working branch>
We can add the template to the repository for reference and this way we can avoid using hooks.
What do you think ?
from dscr-for-vmware.
from dscr-for-vmware.
Ok then. I will soon add it to the repository with instructions on how to use it.
from dscr-for-vmware.
Added the git template to the repository. Closing the issue.
from dscr-for-vmware.
Related Issues (20)
- VMware.PSDesiredStateConfiguration not published to powershell gallery. HOT 2
- [Feature] Potential improvement/changes in future
- [Documentation] Add Getting Started documentation in the README.md
- Export the configuration to a json/yaml file with the new LCM engine
- New Resource: Ability to update the existing VMkernel NIC (vmk*) interface HOT 2
- DSC Resource for setting up a vSAN Cluster
- DSC Resource for Setting up a vLCM Cluster with a desired image
- Test-VmwDscConfiguration doesn't work HOT 3
- error running start-vmwdscconfiguration HOT 2
- Cannot validate argument on parameter 'Id'. The argument is null or empty. HOT 2
- DSC for Creating VM ? HOT 2
- Feature request: set default PSP for SATP HOT 2
- DSC Implementation for Resource Pool HOT 3
- [Feature] Managing vCenter Roles and Permissions
- Request option to configure VDS with Netflow and Healthchecks via DSC
- Cluster HAAdmissionControl settings
- Add Feature to VMHostFirewallRuleset for Custom FW-Rules
- BUG in VDPortGroup
- Export ESXi host settings for documentation/restoration ability
- Simple configuration fails with InvalidOperation error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dscr-for-vmware.