-
Notifications
You must be signed in to change notification settings - Fork 3
gitcommitwd
Commit or ammend a commit with a custom date.
File Name : gitcommit.ps1
Author : Adewale Azeez - azeezadewale98@gmail.com
Date : Mar-30-2020
Commit with a custom date. To commit in the past set the day value to - number of days in past. E.g. to commit
- 3 days ago set the Day value to -3. Add and commit all the edited file to git with the commit message as the variadic arguments without quotes
gitcommitwd [[-Day] <Int32>] [-Amend] [-args] <String[]>
[<CommonParameters>] | attr | value |
|---|---|
| Required? | false |
| Position? | 1 |
| Default value | 0 |
| Accept pipeline input? | false |
| Accept wildcard characters? | false |
| attr | value |
|---|---|
| Required? | false |
| Position? | named |
| Default value | False |
| Accept pipeline input? | false |
| Accept wildcard characters? | false |
| attr | value |
|---|---|
| Required? | true |
| Position? | 2 |
| Default value | |
| Accept pipeline input? | false |
| Accept wildcard characters? | false |
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
[int] [switch] System.String[]]
[System.String[]]
gitcommit 0 -Amend from here is the commit message
your last commit will be ammended with the message "from here is the commit message" The command is equivalent to git add .; git commit --amend -m "from here is the commit message";
gitcommit -3 from here is the commit message
your changes will be commit with the message "from here is the commit message" plus the author and commit date will be set to 3 days ago. The command is equivalent to git add .; GIT_AUTHOR_DATE='Sun Feb 21 10:03:02 2021 -0400' GIT_COMMITTER_DATE='Sun Feb 21 10:03:02 2021 -0400' git commit -m "from here is the commit message";
MIT License Copyright (c) 2019-2020 Adewale Azeez