nikitavoloboev / gitupdate Goto Github PK
View Code? Open in Web Editor NEWCommit and push updated files with file names as commit message
License: MIT License
Commit and push updated files with file names as commit message
License: MIT License
It would be very helpful if the main README.md contained an example of a commit message created by this tool.
gitupdate -p "Update " . # `Update foo bar baz`
gitupdate --prefix "Update " .
I have a global githook that, among other things, verifies if the commit message begins with an uppercase letter. In the absence of this option, gitupdate
doesn't work with my githook (it emits an obscure error message).
.zshrc
(i.e., in root of git repo)$ gitupdate
Result:
2020/12/16 19:09:56 exit status 1
This assumes we are working on a repo with remotes where we want to push. If it's not the case, it commits but exits with error 128
It should be possible for the user to specify if he wants to push or not.
If I'm working on the same files and doing these temp commits, I guess the commit message would always be the same? It'd be awesome to add some uniqueness to commit messages to easily differentiate them. For example:
5dcc0a0 my-cool-script ๐ ๐ด ๐
331c87a my-cool-script ๐ ๐ ๐
1d7d0a4 my-cool-script ๐
๐ป ๐ถ
bbdfb9a my-cool-script ๐
๐ ๐ฃ
612a7d6 my-cool-script
Would be nice to be able to pass a -v
where is prints what it is doing.
sudo apt install golang-go
[sudo] password for joe:
Reading package lists... Done
Building dependency tree
Reading state information... Done
golang-go is already the newest version (2:1.13~1ubuntu2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
install gitupdate
go get -u github.com/nikitavoloboev/gitupdate
go to git project folder and execute
cd ~/.projectfiles
gitupdate .
gitupdate: command not found
Modify the command in some way to allow just the commit aspect, without pushing.
Right now, the command takes 3-5 seconds, and I assume that's because gitupdate
pushes no matter what.
In cases where I don't really care to push right now, and just want a quick commit, it'd be nice to have it be quicker. Whether that means adding a CLI flag like -c
or -n
, or changing the default and having consumers do gitupdate . && git push
and/or setting up a shell alias for it.
Maybe I'll just get used to the behavior, but at least wanted to make an issue for it and bring it up for discussion.
Running go get -u github.com/nikitavoloboev/gitupdate
fails with following error:
go: go.mod file not found in current directory or any parent directory.
'go get' is no longer supported outside a module.
To build and install a command, use 'go install' with a version,
like 'go install example.com/cmd@latest'
For more information, see https://golang.org/doc/go-get-install-deprecation
or run 'go help get' or 'go help install'.
Running following does work:
go install github.com/nikitavoloboev/gitupdate@latest
โ ~ go version
go version go1.18.3 darwin/arm64
I receive fork/exec /usr/local/bin/git: no such file or directory
every time when I run it with the path argument.
I suppose it happens because the path to git executable is hardcoded like here: https://github.com/nikitavoloboev/gitupdate/blob/master/main.go#L31
It works if I use just git
instead of /usr/local/bin/git
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.