Compare commits

..

71 commits
v5.2 ... master

Author SHA1 Message Date
Bhupesh-V 38b7be7335 🔖 release 5.9
Some checks failed
build / Linux Test (push) Has been cancelled
2025-04-13 14:41:16 +05:30
Bhupesh-V 2b0936d813 add support for recovering multiple uncommited deleted files (#79) 2025-04-13 14:40:43 +05:30
allcontributors[bot] fc4e473fa2
docs: add luxxmr as a contributor for doc (#78)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2025-03-18 14:12:13 +05:30
luxxmr 43c205e315
README.md file update to include the "git-undo" command conflict with git-extra. (#77) 2025-03-18 14:11:17 +05:30
Bhupesh Varshney 019646b1ed
add docker pulls 2024-02-07 14:42:34 +05:30
Bhupesh-V ab99ea6110 🐛 my bad, forgot grep (used by undo git rm) 2024-02-06 23:41:00 +05:30
Bhupesh Varshney 8f6e7218da
add package status 2024-02-05 13:47:04 +05:30
Bhupesh-V 0295f27059 🔖 release 5.8 ready 2024-02-03 12:07:32 +05:30
Bhupesh Varshney 75b2cd6e9e
add dockerfile (#72) 2024-02-03 11:57:47 +05:30
Bhupesh Varshney 4cf49f843a
grammar fixes 2024-02-03 11:47:03 +05:30
Bhupesh Varshney 5d6b3688f2
🚸 improve support for running ugit via docker (#68) (#69)
- don't update ugit inside docker
- instead of opening a browser, print the guide URL
- remove usage of basename on help text (#66)
2024-02-02 23:11:16 +05:30
allcontributors[bot] 2489a568cb
docs: add T-Joseph-Kim as a contributor for code (#71)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2024-02-02 23:07:16 +05:30
Taebok Joseph Kim d76d376c30
Removed usage of HEREDOCS and replaced with preferred "printf" statements for printing "--help" text. (#70)
---------

Co-authored-by: Bhupesh Varshney <varshneybhupesh@gmail.com>
2024-02-02 23:05:06 +05:30
Bhupesh-V 7be63fc4c5 🔖 release v5.7 2023-10-20 12:06:19 +05:30
Bhupesh Varshney 1f4a0c57c2
Merge pull request #65 from wrecklass/master
Sort tags by refname in fzf list. Issue #64
2023-10-20 12:04:50 +05:30
Stephen Martin 40289fd584 Sort tags by refname in fzf list. Issue #64 2023-10-18 22:58:45 -06:00
Bhupesh-V 21f96ec035 🔖 release 5.6 2023-05-27 16:01:23 +05:30
Bhupesh Varshney 6db2f6b3d9
Merge pull request #61 from nalin-singh/feature
Added empty list check
2023-05-27 15:59:30 +05:30
Nalin Singh b959579bee Suggestion Resolved 2023-05-26 12:56:44 +05:30
Nalin Singh 7c3a283e43 Added empty list check 2023-05-24 16:16:32 +05:30
Bhupesh-V 8ae45783d2 🔖 release 5.5 2023-03-27 17:27:24 +05:30
Bhupesh Varshney 7c81a3e32f
Merge pull request #60 from Bhupesh-V/all-contributors/add-dr41d45
docs: add dr41d45 as a contributor for code
2023-03-27 17:23:34 +05:30
allcontributors[bot] 44a45f3419
docs: update .all-contributorsrc [skip ci] 2023-03-27 11:53:24 +00:00
allcontributors[bot] d7afd0552a
docs: update README.md [skip ci] 2023-03-27 11:53:23 +00:00
Bhupesh Varshney e58ac52709
Merge pull request #59 from dr41d45/master
Update fzf version comparison to remove letters and parentheses
2023-03-27 17:21:38 +05:30
dr41d45 562dfe8a8a Fix fzf version comparison for --pointer option 2023-03-27 09:25:24 +03:00
dr41d45 19ed0d8c08 Update fzf version comparison to remove letters and parentheses 2023-02-24 16:00:35 +02:00
Bhupesh Varshney 59b1e4fe50
latest news 2022-10-31 10:44:36 +05:30
Bhupesh Varshney 76b4c96fbf
bump release no 2022-10-12 18:40:41 +05:30
Bhupesh Varshney 803ece4a10
Merge pull request #57 from Bhupesh-V/all-contributors/add-Theotime812
docs: add Theotime812 as a contributor for code, and bug
2022-10-09 11:53:23 +05:30
allcontributors[bot] 60928bad9f
docs: update .all-contributorsrc [skip ci] 2022-10-09 06:22:51 +00:00
allcontributors[bot] f845e84a8c
docs: update README.md [skip ci] 2022-10-09 06:22:50 +00:00
Bhupesh Varshney dd91afca46
Merge pull request #56 from Theotime812/master
Added support for fzf < 0.21.0
2022-10-09 11:52:05 +05:30
Théotime Maillarbaux 77b1f7f24a
Added double quotes around new variables when they're used 2022-10-08 01:58:18 +02:00
thmaillarb b5d650181a Added support for fzf < 0.21.0 2022-10-05 15:20:01 +02:00
Bhupesh-V 7fb08530fa update application id 2022-09-18 13:57:40 +05:30
Bhupesh Varshney 6d5fe5aa61
Merge pull request #54 from Bhupesh-V/all-contributors/add-RohitSingh107
add RohitSingh107 as a contributor
2022-09-18 13:44:19 +05:30
allcontributors[bot] 8fcf45c947
update .all-contributorsrc [skip ci] 2022-09-18 08:14:09 +00:00
allcontributors[bot] 60137bbb86
update README.md [skip ci] 2022-09-18 08:14:08 +00:00
Bhupesh Varshney 8bf1dec8ed
Merge pull request #53 from RohitSingh107/master
added flatpak
2022-09-18 13:43:12 +05:30
Rohit 1c698ca10b added flatpak 2022-09-08 22:30:09 +05:30
Bhupesh Varshney cd5960b2f4
Merge pull request #52 from thecesrom/fix/undo-initial-commit-printf-success
fix: `printf` command when undoing initial commit
2022-08-29 11:23:28 +05:30
César Román 78f3e559f3
fix: fix printf command when undoing initial commit 2022-08-27 17:08:49 -07:00
Bhupesh-V 14da50780e 🐛 fix incorrect invocation of perror 2022-08-27 12:31:26 +05:30
Bhupesh Varshney ab2cccb9ba
Merge pull request #51 from kopalchakravarty/add_bug_report_url
Add Bug Report URL
2022-08-27 12:23:22 +05:30
Kopal Chakravarty ec4e4eea57
Merge branch 'Bhupesh-V:master' into add_bug_report_url 2022-08-26 12:07:52 +05:30
kopalchakravarty 8608fcd0a4 Fix error condition 2022-08-26 12:05:39 +05:30
Bhupesh-V 55d743f445 fix headings in installation doc 2022-08-26 12:03:26 +05:30
Bhupesh-V 87ed8b447a 🛂 change strategy to show release changelog
Unfortunately we can't parse the markdown text correctly returned by the API
We will now mention the release URL to read changelog instead of doing any smart text wrangling.
2022-08-26 11:56:23 +05:30
kopalchakravarty 9a27136a86 Invoke error function: handle error cases 2022-08-26 11:53:47 +05:30
Bhupesh Varshney 7c97133bd5
Merge pull request #50 from Bhupesh-V/all-contributors/add-vinayaknayar
docs: add vinayaknayar as a contributor for doc
2022-08-26 11:52:37 +05:30
allcontributors[bot] 57b554b40c
docs: update .all-contributorsrc [skip ci] 2022-08-26 06:22:09 +00:00
allcontributors[bot] aa02fd3222
docs: update README.md [skip ci] 2022-08-26 06:22:08 +00:00
Bhupesh Varshney 711da942fc
Merge pull request #48 from vinayaknayar/doc-fixes
installation guide for windows
2022-08-26 11:51:29 +05:30
kopalchakravarty 10edf04217 Add:Bug report URL 2022-08-26 11:32:14 +05:30
vinayaknayar f8b761773c indented the code blocks 2022-08-25 22:41:28 +05:30
Bhupesh Varshney 076516c026
Merge pull request #49 from Bhupesh-V/all-contributors/add-nalin-singh
docs: add nalin-singh as a contributor for code
2022-08-25 12:58:48 +05:30
allcontributors[bot] 23af318e87
docs: update .all-contributorsrc [skip ci] 2022-08-25 07:28:27 +00:00
allcontributors[bot] db848b898d
docs: update README.md [skip ci] 2022-08-25 07:28:26 +00:00
Bhupesh Varshney f352175a0b
Merge pull request #47 from nalin-singh/feature
Add: Undo git rm
2022-08-25 12:57:40 +05:30
vinayaknayar ec793ae4fe md lists instead of headings 2022-08-25 12:19:27 +05:30
Nalin Singh 64714b2e85 Removed Unwanted Message 2022-08-25 11:52:42 +05:30
vinayaknayar 1e30dc5185 installation guide for windows 2022-08-24 22:15:28 +05:30
Nalin Singh 5ead678252 Add: Undo git rm 2022-08-24 19:09:08 +05:30
Bhupesh Varshney ccba21fec4
Merge pull request #46 from Bhupesh-V/all-contributors/add-zora89
docs: add zora89 as a contributor for doc
2022-08-22 18:33:43 +05:30
allcontributors[bot] 146c84d92a
docs: update .all-contributorsrc [skip ci] 2022-08-22 13:03:30 +00:00
allcontributors[bot] e8f18dbb37
docs: update README.md [skip ci] 2022-08-22 13:03:29 +00:00
Bhupesh Varshney ccc7fad303
Merge pull request #45 from zora89/master
Improved Intro Articulation
2022-08-22 18:32:41 +05:30
Zorawar Purohit 7c071eb76f
Update README.md
Co-authored-by: Bhupesh Varshney <varshneybhupesh@gmail.com>
2022-08-22 18:29:13 +05:30
Zorawar Purohit e1a13d55eb
Improved Intro Aritculation 2022-08-22 01:04:49 +05:30
Bhupesh Varshney 1d7e449b2a
git tag 2022-08-16 11:06:46 +05:30
7 changed files with 414 additions and 82 deletions

View file

@ -63,6 +63,79 @@
"contributions": [
"code"
]
},
{
"login": "zora89",
"name": "Zorawar Purohit",
"avatar_url": "https://avatars.githubusercontent.com/u/42845567?v=4",
"profile": "https://www.zorawarpurohit.com",
"contributions": [
"doc"
]
},
{
"login": "nalin-singh",
"name": "Nalin Singh",
"avatar_url": "https://avatars.githubusercontent.com/u/38408670?v=4",
"profile": "https://craftic.webflow.io",
"contributions": [
"code"
]
},
{
"login": "vinayaknayar",
"name": "vinayaknayar",
"avatar_url": "https://avatars.githubusercontent.com/u/98237998?v=4",
"profile": "https://github.com/vinayaknayar",
"contributions": [
"doc"
]
},
{
"login": "RohitSingh107",
"name": "RohitSingh107",
"avatar_url": "https://avatars.githubusercontent.com/u/64142943?v=4",
"profile": "https://github.com/RohitSingh107",
"contributions": [
"platform"
]
},
{
"login": "Theotime812",
"name": "Théotime Maillarbaux",
"avatar_url": "https://avatars.githubusercontent.com/u/45947878?v=4",
"profile": "https://github.com/Theotime812",
"contributions": [
"code",
"bug"
]
},
{
"login": "dr41d45",
"name": "dr41d45",
"avatar_url": "https://avatars.githubusercontent.com/u/47773787?v=4",
"profile": "https://github.com/dr41d45",
"contributions": [
"code"
]
},
{
"login": "T-Joseph-Kim",
"name": "Taebok Joseph Kim",
"avatar_url": "https://avatars.githubusercontent.com/u/116681578?v=4",
"profile": "https://github.com/T-Joseph-Kim",
"contributions": [
"code"
]
},
{
"login": "luxxmr",
"name": "luxxmr",
"avatar_url": "https://avatars.githubusercontent.com/u/185298948?v=4",
"profile": "https://github.com/luxxmr",
"contributions": [
"doc"
]
}
],
"contributorsPerLine": 7,
@ -70,5 +143,7 @@
"projectOwner": "Bhupesh-V",
"repoType": "github",
"repoHost": "https://github.com",
"skipCi": true
"skipCi": true,
"commitConvention": "angular",
"commitType": "docs"
}

71
Dockerfile Normal file
View file

@ -0,0 +1,71 @@
FROM alpine:3.18 as ugit-ops
RUN apk add --no-cache \
bash \
coreutils \
git \
ncurses \
curl
# Download fzf binary from GitHub, pin to 0.46.0, ugit requires minimum 0.21.0
RUN curl -L -o fzf.tar.gz https://github.com/junegunn/fzf/releases/download/0.46.0/fzf-0.46.0-linux_amd64.tar.gz && \
tar -xzf fzf.tar.gz && \
mv fzf /usr/bin/
# Copy only the ugit script into the container at /app
COPY ugit .
# Set permissions and move the script to path
RUN chmod +x ugit && mv ugit /usr/bin/
# Second stage: Copy only necessary binaries and their dependencies
FROM scratch
LABEL description="Undo your last oopsie in git with ugit"
LABEL maintainer="Bhupesh Varshney <varshneybhupesh@gmail.com>"
COPY --from=ugit-ops /usr/bin/ugit /bin/
COPY --from=ugit-ops /usr/bin/git /usr/bin/
COPY --from=ugit-ops /usr/bin/fzf /usr/bin/
COPY --from=ugit-ops /usr/bin/tput /usr/bin/
COPY --from=ugit-ops /usr/bin/nl /usr/bin/
COPY --from=ugit-ops /usr/bin/awk /usr/bin/
COPY --from=ugit-ops /usr/bin/xargs /usr/bin/
COPY --from=ugit-ops /usr/bin/cut /usr/bin/
COPY --from=ugit-ops /usr/bin/tr /usr/bin/
COPY --from=ugit-ops /bin/bash /bin/
COPY --from=ugit-ops /bin/grep /bin/
# copy lib files
# COPY --from=ugit-ops /usr/lib/libncursesw* /usr/lib/
COPY --from=ugit-ops /usr/lib/libncursesw.so.6 /usr/lib/
# COPY --from=ugit-ops /usr/lib/libpcre* /usr/lib/
COPY --from=ugit-ops /usr/lib/libpcre2-8.so.0 /usr/lib/
# COPY --from=ugit-ops /usr/lib/libreadline* /usr/lib/
COPY --from=ugit-ops /usr/lib/libreadline.so.8 /usr/lib/
COPY --from=ugit-ops /lib/libacl.so.1 /lib/
COPY --from=ugit-ops /lib/libattr.so.1 /lib/
COPY --from=ugit-ops /lib/libc.musl-* /lib/
COPY --from=ugit-ops /lib/ld-musl-* /lib/
COPY --from=ugit-ops /lib/libutmps.so.0.1 /lib/
COPY --from=ugit-ops /lib/libskarnet.so.2.13 /lib/
COPY --from=ugit-ops /lib/libz.so.1 /lib/
# copy terminfo database
COPY --from=ugit-ops /etc/terminfo/x/xterm-256color /usr/share/terminfo/x/
# Gib me all the colors
ENV TERM=xterm-256color
# Let fzf know our deault shell
ENV SHELL=/bin/bash
# Let ugit know we are running in docker
ENV UGIT_RUNNING_IN_DOCKER=true
WORKDIR /app
# Run ugit when the container launches
ENTRYPOINT ["/bin/bash", "/bin/ugit"]

142
README.md
View file

@ -5,8 +5,8 @@
<a href="https://github.com/Bhupesh-V/ugit/actions/workflows/build.yml">
<img alt="build ugit" src="https://github.com/Bhupesh-V/ugit/actions/workflows/build.yml/badge.svg">
</a>
<a href="https://github.com/Bhupesh-V/ugit/blob/master/LICENSE">
<img alt="License: MIT" src="https://img.shields.io/github/license/Bhupesh-V/ugit" target="_blank" />
<a href="https://hub.docker.com/r/bhupeshimself/ugit">
<img alt="Docker pulls" src="https://img.shields.io/docker/pulls/bhupeshimself/ugit?logo=docker" target="_blank" />
</a>
<img alt="total downloads (github + brew)" src="https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/Bhupesh-V/6b7b8e8576bc1ca237bffd9a344672ab/raw/ugit-downloads.json">
<a href="">
@ -37,18 +37,18 @@ https://user-images.githubusercontent.com/34342551/121651071-d9fd1580-cab7-11eb-
</details></h2>
## Why `ugit`
## Why use `ugit`?
- You accidentally ran a `git` command you wish to 'undo'.
- You want to save time by not searching for _how to undo ..._
- Your focus is on the problems at hand and not on Git (avoid context switching)
- You ran an accidental `git` command you didn't want to.
- You don't want to waste your time searching on _how to undo ..._
- Because you want to focus on problems at hand and not on Git (You don't like context switching)
- Because `ugit` is cool
### [Motivations behind writing ugit 🙇‍♂️️](https://bhupesh-v.github.io/undo-your-last-git-mistake-with-ugit)
## What's in the box
## What's in the box?
`ugit`/`git-undo` supports undoing following operations, some are a WIP. If you know of any other operations that can be undone and is not in the list, make sure to send a quick PR 💛️
`ugit`/`git-undo` supports undoing the following operations, some are a WIP. If you know of any other operations that can be undone and are not in the list, make sure to raise an issue or make a quick PR 💛️
- [x] Undo `git commit`
- [x] Undo `git add`
@ -63,18 +63,19 @@ https://user-images.githubusercontent.com/34342551/121651071-d9fd1580-cab7-11eb-
- [x] Undo (Restore) a file to a previous version
- [x] Undo `git merge`
- [x] Undo `git cherry-pick`
- [ ] Undo `git tag` (rename a tag)
- [x] Undo `git tag`
- [ ] Undo `git rebase`
- [ ] Undo `git worktree remove` (recover deleted work-tree)
Help me finish above tasks by contributing?
Contribute to the project by helping me with the above-mentioned tasks.
Have any other ideas/suggestions? [**Hop in to ugit discussions 💬️**](https://github.com/Bhupesh-V/ugit/discussions/7)
If you have any other ideas/suggestions, do send them across. [**Hop in to ugit discussions 💬️**](https://github.com/Bhupesh-V/ugit/discussions/7)
## News
| When | What |
|:--------------:|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 29 Oct, 2022 | ugit crossed 1k stars |
| 02 June, 2022 | [console.dev](https://console.dev/tools/) featured [ugit](https://twitter.com/bhupeshimself/status/1532714651842396161) |
| 18 May, 2022 | I gave a talk about the git tooling ecosystem & `git undo` in [Undo git, say whaat! - **GitHub India Constellation**, May 2022](https://youtu.be/jpR9BMFmh4Y?t=15240) |
| 12 May, 2021 | The [guide was **tweeted by GitHub**](https://twitter.com/github/status/1392207961355862018?s=20) (I was logging my research process there while building ugit) |
@ -82,11 +83,18 @@ Have any other ideas/suggestions? [**Hop in to ugit discussions 💬️**](https
## Community
- Alexander Alemayhu made a youtube tutorial on [Undoing Your Last Git Commit with Ugit](https://www.youtube.com/watch?v=nUnCgKb4tSc)
- Alexander Alemayhu made a YouTube tutorial on [Undoing Your Last Git Commit with Ugit](https://www.youtube.com/watch?v=nUnCgKb4tSc)
## Installation
[Try `ugit` via Docker](https://hub.docker.com/r/bhupeshimself/ugit):
```bash
docker pull bhupeshimself/ugit
docker run --rm -it -v $(pwd):/app bhupeshimself/ugit
```
### Prerequisites
**ugit** dependencies:
@ -96,9 +104,54 @@ Have any other ideas/suggestions? [**Hop in to ugit discussions 💬️**](https
- [**fzf**](https://github.com/junegunn/fzf) >= `0.21.0` - [Installation guide](https://github.com/junegunn/fzf#installation)
- GNU utils like `awk`, `grep`, `tput` etc
### Installation
<br>
#### Fig
[![Packaging status](https://repology.org/badge/vertical-allrepos/ugit.svg)](https://repology.org/project/ugit/versions)
### Linux
```bash
sh -c "$(curl -fsSL https://raw.githubusercontent.com/Bhupesh-V/ugit/master/install)"
```
Arch Linux users can install [**ugit via AUR**](https://aur.archlinux.org/packages/ugit).
### Mac
```bash
brew install ugit
```
### Windows
To use ugit on Windows you need to install:
1. Git Bash<br>
Git bash comes with git (if you have installed it on your machine then no need). To install git (preferably with scoop):
```
scoop install git
```
2. FZF
```
scoop install fzf
```
Alternatively, with Chocolatey:
```
choco install fzf
```
3. To use bash in terminal change your directory to `**git\2.35.3.windows.1\bin\bash**` accordingly.
4. Then either clone the repo,
```bash
git clone https://github.com/Bhupesh-V/ugit.git
```
or get it using curl:
```bash
sh -c "$(curl -fsSL https://raw.githubusercontent.com/Bhupesh-V/ugit/master/install)"
```
### Fig
[Fig](https://fig.io) adds apps, shortcuts, and autocomplete to your existing terminal.
@ -106,24 +159,6 @@ Install `ugit` in just one click.
<a href="https://fig.io/plugins/other/ugit_Bhupesh-V" target="_blank"><img src="https://fig.io/badges/install-with-fig.svg" /></a>
#### Linux
```bash
sh -c "$(curl -fsSL https://raw.githubusercontent.com/Bhupesh-V/ugit/master/install)"
```
Or Arch Linux users can install [**ugit via AUR**](https://aur.archlinux.org/packages/ugit).
#### Mac
```bash
brew install ugit
```
#### Windows
Using ugit on windows is still in experimental phases. You can use the new windows terminal + git bash to run ugit. Please read [this thread for more info](https://github.com/Bhupesh-V/ugit/issues/20#issuecomment-1048234725)
### ZSH Frameworks
@ -157,6 +192,15 @@ If you're using [oh-my-zsh](github.com/robbyrussell/oh-my-zsh):
`source ~/.zshrc`
### Note on `git-undo` Command Conflict
If you have both `ugit` and `git-extras` (https://github.com/tj/git-extras) installed, be aware that both provide a `git-undo` command. This can lead to conflicts, as only one version of the command will be accessible at a time. To resolve this:
- **Using Homebrew**: Homebrew will notify you of the conflict during installation. You can choose to unlink the conflicting formula or use the --overwrite flag to force the link as follows:
`brew link --overwrite ugit`
- **Manual Installation**: Ensure that the `git-undo` command from the desired package is prioritized in your system's PATH.
## Please read ⚠️
@ -164,14 +208,14 @@ If you're using [oh-my-zsh](github.com/robbyrussell/oh-my-zsh):
Git comes with a garbage collector ([in case you didn't know](https://git-scm.com/docs/git-gc)) therefore undoing some commands will become impossible if the entries are deleted from the reflog.
One way to prevent this is to increase default time limits before the reflog entries expire.
Add these configuration in your global `.gitconfig` file:
Add these configurations in your global `.gitconfig` file:
```gitconfig
[gc]
# default 90 days
reflogExpire = 200
```
Used to set how long records in a branches reflog should be preserved.
Used to set how long records in a branch reflog should be preserved.
```gitconfig
[gc]
@ -211,14 +255,26 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tr>
<td align="center"><a href="https://github.com/sharan-aithal"><img src="https://avatars.githubusercontent.com/u/32029982?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Sharan Aithal</b></sub></a><br /><a href="https://github.com/Bhupesh-V/ugit/commits?author=sharan-aithal" title="Code">💻</a> <a href="https://github.com/Bhupesh-V/ugit/commits?author=sharan-aithal" title="Documentation">📖</a></td>
<td align="center"><a href="https://tabulate.tech"><img src="https://avatars.githubusercontent.com/u/58576759?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Tabulate</b></sub></a><br /><a href="https://github.com/Bhupesh-V/ugit/commits?author=TabulateJarl8" title="Code">💻</a> <a href="#platform-TabulateJarl8" title="Packaging/porting to new platform">📦</a></td>
<td align="center"><a href="http://unixorn.github.io"><img src="https://avatars.githubusercontent.com/u/23920?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Joe Block</b></sub></a><br /><a href="https://github.com/Bhupesh-V/ugit/commits?author=unixorn" title="Code">💻</a> <a href="https://github.com/Bhupesh-V/ugit/commits?author=unixorn" title="Documentation">📖</a> <a href="#plugin-unixorn" title="Plugin/utility libraries">🔌</a></td>
<td align="center"><a href="https://thecesrom.dev/"><img src="https://avatars.githubusercontent.com/u/19418023?v=4?s=100" width="100px;" alt=""/><br /><sub><b>César Román</b></sub></a><br /><a href="https://github.com/Bhupesh-V/ugit/commits?author=thecesrom" title="Code">💻</a> <a href="https://github.com/Bhupesh-V/ugit/issues?q=author%3Athecesrom" title="Bug reports">🐛</a></td>
<td align="center"><a href="https://github.com/ibayramli2001"><img src="https://avatars.githubusercontent.com/u/43158991?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ilkin Bayramli</b></sub></a><br /><a href="#platform-ibayramli2001" title="Packaging/porting to new platform">📦</a></td>
<td align="center"><a href="https://github.com/kopalchakravarty"><img src="https://avatars.githubusercontent.com/u/31576619?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Kopal Chakravarty</b></sub></a><br /><a href="https://github.com/Bhupesh-V/ugit/commits?author=kopalchakravarty" title="Code">💻</a></td>
</tr>
<tbody>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/sharan-aithal"><img src="https://avatars.githubusercontent.com/u/32029982?v=4?s=100" width="100px;" alt="Sharan Aithal"/><br /><sub><b>Sharan Aithal</b></sub></a><br /><a href="https://github.com/Bhupesh-V/ugit/commits?author=sharan-aithal" title="Code">💻</a> <a href="https://github.com/Bhupesh-V/ugit/commits?author=sharan-aithal" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://tabulate.tech"><img src="https://avatars.githubusercontent.com/u/58576759?v=4?s=100" width="100px;" alt="Tabulate"/><br /><sub><b>Tabulate</b></sub></a><br /><a href="https://github.com/Bhupesh-V/ugit/commits?author=TabulateJarl8" title="Code">💻</a> <a href="#platform-TabulateJarl8" title="Packaging/porting to new platform">📦</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://unixorn.github.io"><img src="https://avatars.githubusercontent.com/u/23920?v=4?s=100" width="100px;" alt="Joe Block"/><br /><sub><b>Joe Block</b></sub></a><br /><a href="https://github.com/Bhupesh-V/ugit/commits?author=unixorn" title="Code">💻</a> <a href="https://github.com/Bhupesh-V/ugit/commits?author=unixorn" title="Documentation">📖</a> <a href="#plugin-unixorn" title="Plugin/utility libraries">🔌</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://thecesrom.dev/"><img src="https://avatars.githubusercontent.com/u/19418023?v=4?s=100" width="100px;" alt="César Román"/><br /><sub><b>César Román</b></sub></a><br /><a href="https://github.com/Bhupesh-V/ugit/commits?author=thecesrom" title="Code">💻</a> <a href="https://github.com/Bhupesh-V/ugit/issues?q=author%3Athecesrom" title="Bug reports">🐛</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ibayramli2001"><img src="https://avatars.githubusercontent.com/u/43158991?v=4?s=100" width="100px;" alt="Ilkin Bayramli"/><br /><sub><b>Ilkin Bayramli</b></sub></a><br /><a href="#platform-ibayramli2001" title="Packaging/porting to new platform">📦</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/kopalchakravarty"><img src="https://avatars.githubusercontent.com/u/31576619?v=4?s=100" width="100px;" alt="Kopal Chakravarty"/><br /><sub><b>Kopal Chakravarty</b></sub></a><br /><a href="https://github.com/Bhupesh-V/ugit/commits?author=kopalchakravarty" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://www.zorawarpurohit.com"><img src="https://avatars.githubusercontent.com/u/42845567?v=4?s=100" width="100px;" alt="Zorawar Purohit"/><br /><sub><b>Zorawar Purohit</b></sub></a><br /><a href="https://github.com/Bhupesh-V/ugit/commits?author=zora89" title="Documentation">📖</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://craftic.webflow.io"><img src="https://avatars.githubusercontent.com/u/38408670?v=4?s=100" width="100px;" alt="Nalin Singh"/><br /><sub><b>Nalin Singh</b></sub></a><br /><a href="https://github.com/Bhupesh-V/ugit/commits?author=nalin-singh" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/vinayaknayar"><img src="https://avatars.githubusercontent.com/u/98237998?v=4?s=100" width="100px;" alt="vinayaknayar"/><br /><sub><b>vinayaknayar</b></sub></a><br /><a href="https://github.com/Bhupesh-V/ugit/commits?author=vinayaknayar" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/RohitSingh107"><img src="https://avatars.githubusercontent.com/u/64142943?v=4?s=100" width="100px;" alt="RohitSingh107"/><br /><sub><b>RohitSingh107</b></sub></a><br /><a href="#platform-RohitSingh107" title="Packaging/porting to new platform">📦</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Theotime812"><img src="https://avatars.githubusercontent.com/u/45947878?v=4?s=100" width="100px;" alt="Théotime Maillarbaux"/><br /><sub><b>Théotime Maillarbaux</b></sub></a><br /><a href="https://github.com/Bhupesh-V/ugit/commits?author=Theotime812" title="Code">💻</a> <a href="https://github.com/Bhupesh-V/ugit/issues?q=author%3ATheotime812" title="Bug reports">🐛</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/dr41d45"><img src="https://avatars.githubusercontent.com/u/47773787?v=4?s=100" width="100px;" alt="dr41d45"/><br /><sub><b>dr41d45</b></sub></a><br /><a href="https://github.com/Bhupesh-V/ugit/commits?author=dr41d45" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/T-Joseph-Kim"><img src="https://avatars.githubusercontent.com/u/116681578?v=4?s=100" width="100px;" alt="Taebok Joseph Kim"/><br /><sub><b>Taebok Joseph Kim</b></sub></a><br /><a href="https://github.com/Bhupesh-V/ugit/commits?author=T-Joseph-Kim" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/luxxmr"><img src="https://avatars.githubusercontent.com/u/185298948?v=4?s=100" width="100px;" alt="luxxmr"/><br /><sub><b>luxxmr</b></sub></a><br /><a href="https://github.com/Bhupesh-V/ugit/commits?author=luxxmr" title="Documentation">📖</a></td>
</tr>
</tbody>
</table>
<!-- markdownlint-restore -->

154
ugit
View file

@ -7,8 +7,9 @@ set -uo pipefail;
SCRIPT_NAME="$0"
SCRIPT_URL="https://github.com/Bhupesh-V/ugit/releases/latest/download/ugit"
TMP_FILE="/tmp/ugit.sh"
VERSION="5.2"
VERSION="5.9"
pointer=""
BOLD_ORG_FG=$(tput bold)$(tput setaf 208)
BOLD=$(tput bold)
RESET=$(tput sgr0)
@ -34,10 +35,14 @@ display_menu() {
printf "%s\n" "Undo ${BOLD_ORG_FG}git cherry-pick${RESET}"
printf "%s\n" "Undo all current uncommited changes"
printf "%s\n" "Undo ${BOLD_ORG_FG}git tag${RESET}"
printf "%s\n" "Undo ${BOLD_ORG_FG}git rm${RESET}"
}
perror() {
printf "%s\n" "$(tput bold)$(tput setaf 196)ugit error${RESET}: $1"
printf "%s\n" "If you think this is a Ugit bug, please follow this link to report it:"
printf "%s\n" "${BOLD_ORG_FG}https://github.com/Bhupesh-V/ugit/issues/new?template=bug-report.yml${RESET}"
exit
}
undo_git_commit() {
@ -60,14 +65,23 @@ undo_git_commit() {
# This will not delete the files from your working directory
if [[ "$last_commit" == "$initial_commit" ]]; then
if git update-ref -d HEAD && git rm --cached -rf . > /dev/null 2>&1; then
printf "%s\nInitial commit: $initial_commit successfully undone. Commit state is clean."
printf "%s\n" "Initial commit: $initial_commit successfully undone. Commit state is clean."
else
perror "Error: Failed to revert initial commit"
exit
fi
elif git reset HEAD~; then
printf "%s\n" "Commit: $last_commit successfully undone"
else
perror "Failed to revert commit $last_commit"
exit
fi
elif git revert "$commit"; then
printf "%s\n" "Commit: $commit successfully reverted. Check ${BOLD_ORG_FG}git status${RESET}"
else
perror "Error: unable to perfom operation"
fi
}
do_git_reset() {
@ -77,7 +91,7 @@ do_git_reset() {
# check if working tree is clean or not
[[ $(git status --porcelain 2>/dev/null) != "" ]] && read -p "You have uncommited changes, still proceed? [Y/n]: " -n 1 -r USER_INPUT
USER_INPUT=${USER_INPUT:-Y}
[[ "$USER_INPUT" == Y ]] && git reset --hard "$last_good_state"
[[ "$USER_INPUT" == Y ]] && git reset --hard "$last_good_state" || perror "Error: unable to perform reset operation"
}
undo_git_add() {
@ -89,6 +103,8 @@ undo_git_add() {
if [[ ${#choices[@]} -gt 0 ]] && git restore --staged "${choices[@]}"; then
printf "%s\n" "Done 👍️"
else
perror "Error: unable to perform operation"
fi
}
@ -97,8 +113,8 @@ change_commit_message() {
printf "%s" "Enter New Commit Message (Ctrl+d to save):"
msg=$(</dev/stdin)
echo
[[ "$msg" != "" ]] && git commit --amend -m "$msg" || perror "Empty Commit string!"
printf "%s\n" "Remember to run ${BOLD_ORG_FG}git push -f <remoteName> <branchName>${RESET} if this was a pushed commit"
[[ "$msg" != "" ]] && git commit --amend -m "$msg" && printf "%s\n" "Remember to run ${BOLD_ORG_FG}git push -f <remoteName> <branchName>${RESET} if this was a pushed commit" \
|| perror "Empty Commit string!"
}
undo_git_push() {
@ -106,6 +122,8 @@ undo_git_push() {
if git revert "$commit"; then
printf "%s\n" "Commit: $commit successfully reverted."
printf "%s\n" "Make sure to run ${BOLD_ORG_FG}git push${RESET} now!"
else
perror "Error: unable to perform operation"
fi
}
@ -118,7 +136,7 @@ undo_branch_delete() {
if [ -n "$BRANCH_NAME" ] && git checkout -b "$BRANCH_NAME" "$last_branch_commit"; then
printf "%s\n" "Branch $BRANCH_NAME successfully recovered 👍️"
else
perror "Error: unable to perform operation"
perror "Failed to recover branch $BRANCH_NAME"
fi
}
@ -126,6 +144,8 @@ undo_git_reset() {
LAST_GOOD_STATE=$(git reflog | fzf --ansi --height 20% --reverse --multi --header="Choose last known good commit" | awk '{print $1}')
if [[ -n "$LAST_GOOD_STATE" ]] && git reset "$LAST_GOOD_STATE"; then
printf "%s\n" "Reset to $LAST_GOOD_STATE 👍️"
else
perror "Unable to reset state"
fi
}
@ -143,7 +163,15 @@ undo_git_merge() {
[[ $(git status --porcelain 2>/dev/null) != "" ]] && read -p "You have uncommited changes, still proceed? [Y/n]: " -n 1 -r USER_INPUT
USER_INPUT=${USER_INPUT:-Y}
# ref: ORIG_HEAD points to the original commit from before the merge
[[ "$USER_INPUT" == Y ]] && git reset --merge ORIG_HEAD || exit 0
if [[ "$USER_INPUT" == Y ]]; then
if git reset --merge ORIG_HEAD; then
printf "Operation completed successfully"
else
perror "Unable to revert merge commit"
fi
else
exit
fi
# [[ "$USER_INPUT" == Y ]] && git reset --merge "$last_good_state" || exit 0
else
default_branch=$(git remote show origin | awk '/HEAD/ {print $3}')
@ -152,20 +180,27 @@ undo_git_merge() {
commit=$(git log --oneline | fzf --ansi --height 10% --reverse --header="Choose the merge commit" | awk '{print $1}')
if git revert -m 1 "$commit"; then
printf "%s\n" "Merge ($commit) successfully reverted 👍️"
else perror "Unable to revert merge commit"
fi
fi
}
recover_lost_stash() {
LOST_STASH=$(git fsck --no-progress --unreachable | \
awk '/commit/ {print $3}' | \
xargs git log --color --oneline --merges --no-walk | \
fzf --ansi --height 20% --reverse --header="Choose commit associated with stash" | awk '{print $1}'
LOST_STASH=$(git fsck --no-progress --unreachable |
awk '/commit/ {print $3}' |
xargs git log --color --oneline --merges --no-walk
)
[[ "$LOST_STASH" ]] && read -p "Enter Stash Description: " -r STASH_MSG || exit
if [ -z "$LOST_STASH" ]; then
printf "%s\n" "No unreachable commits found. Exiting..."
exit
fi
if git update-ref refs/stash "$LOST_STASH" --create-reflog -m "$STASH_MSG"; then
STASH=$(echo "$LOST_STASH" | fzf --ansi --height 20% --reverse --header="Choose commit associated with stash" | awk '{print $1}')
read -p "Enter Stash Description: " -r STASH_MSG
if git update-ref refs/stash "$STASH" --create-reflog -m "$STASH_MSG"; then
printf "%s\n" "Stash Successfully Recovered 👍️"
else
perror "Unable to recover stash"
@ -211,11 +246,22 @@ recover_deleted_tag() {
undo_file_delete() {
if [[ "$1" = "uncommited" ]]; then
# user didn't commit the file deletion
DELETED_FILE=$(git ls-files -d | fzf --ansi --height 20% --reverse --header="Choose deleted file to recover" | awk '{print $1}')
if git checkout HEAD "$DELETED_FILE"; then
printf "%s\n" "${BOLD}$DELETED_FILE${RESET} Successfully Recovered 👍️"
readarray -t DELETED_FILES < <(
git ls-files -d |
fzf --ansi --height 20% --reverse --header="Choose deleted files to recover" --multi |
awk '{print $1}'
)
if [ ${#DELETED_FILES[@]} -eq 0 ]; then
exit 0
fi
if git checkout HEAD -- "${DELETED_FILES[@]}"; then
printf "%s\n" "${BOLD}${DELETED_FILES[*]}${RESET}"
printf "%s\n" "Successfully Recovered ${#DELETED_FILES[@]} file(s)"
else
perror "Unable to recover ${BOLD}${DELETED_FILES[*]}${RESET}"
fi
elif [[ "$1" = "commited" ]]; then
read -p "Enter complete filename: " -r FILENAME
COMMIT=$(git log --color --diff-filter=D --oneline | fzf --ansi --height 50% \
@ -229,6 +275,8 @@ undo_file_delete() {
if git checkout "$COMMIT"~1 -- "$FILENAME"; then
printf "%s\n" "${BOLD}$FILENAME${RESET} Successfully Recovered 👍️"
else
perror "Unable to recover ${BOLD}$FILENAME${RESET}"
fi
fi
}
@ -254,6 +302,8 @@ restore_file() {
exit 0
elif [[ "$COMMIT" != "" && "$FILE" != "" ]] && git restore --source="$COMMIT" "$FILE"; then
printf "%s\n" "$FILE restored to version at ${BOLD}$COMMIT${RESET}"
else
perror "Error: unable to perform operation"
fi
}
@ -271,6 +321,8 @@ undo_all() {
# printf "%s\n" "Note: Stashing untracked files might take some time, hold on"
printf "%s\n" "Cleared all changes 👍️"
printf "%s\n" "Run ${BOLD_ORG_FG}git stash apply${RESET} to redo changes or ${BOLD_ORG_FG}git stash drop${RESET} to remove them"
else
perror "Error: unable to perform operation"
fi
}
@ -282,7 +334,7 @@ undo_git_tag() {
perror "Unable to fetch tags from remote.Please check repository access."
exit
fi
tag=$(git tag | fzf --ansi --height 80% \
tag=$(git tag --sort=v:refname | fzf --ansi --height 80% \
--reverse --multi --header="Choose a tag to remove" \
--preview "echo {} | cut -d' ' -f1 | xargs -I{} git show --color --pretty=format:%b {}" \
--bind 'j:down,k:up,ctrl-j:preview-down,ctrl-k:preview-up,ctrl-space:toggle-preview' --preview-window right:60% )
@ -306,6 +358,20 @@ undo_git_tag() {
fi
}
undo_git_rm(){
# Find all the deleted files from git history
filepath=$(git log --diff-filter=D --summary | grep delete | nl -n ln | fzf --header="Choose the file to restore" --height 50% --ansi --reverse "$pointer" --cycle | awk '{print $5}')
# Find the commit hash value of the selected filepath
commit=$(git log -- "$filepath"| awk 'NR==1{print $2}')
# Restore the file
if git checkout "$commit"^ "$filepath"; then
printf "%s\n" "File $filepath restored successfully."
else
perror "Unable to restore Fie $filepath"
fi
}
ugit_menu() {
case $option in
1) undo_git_commit;;
@ -328,6 +394,7 @@ ugit_menu() {
18) undo_git_commit;;
19) undo_all;;
20) undo_git_tag;;
21) undo_git_rm;;
esac
}
@ -352,6 +419,12 @@ check_deps() {
for dep in "${deps[@]}"; do
installed "${dep}" || die "Missing dependency: '${dep}'"
done
# if version of fzf < 0.21, do not use --pointer
fzf_version=$(fzf --version | cut -d "." -f 1,2 | tr -d '.()[:alpha:]')
if test "$fzf_version" -ge 021; then
pointer="--pointer=👉"
fi
}
show_version() {
@ -359,33 +432,33 @@ show_version() {
}
print_help() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-u] [-g]
ugit helps you undo git commands without much effort
Just run 'ugit' and search for what you want to undo
Available options:
-h, --help Print this help and exit
-v, --version Print current ugit version
-u, --update Update ugit
-g, --guide Open ugit undo text guide
EOF
printf "\n%s\n" "Contact 📬️: $(tput bold)varshneybhupesh@gmail.com${RESET} for assistance"
printf "%s\n" "Read the guide: https://bhupesh.gitbook.io/notes/git/how-to-undo-anything-in-git"
printf "\n%s\n" "Please give us ⭐ a if you liked ugit ${BOLD_ORG_FG}https://github.com/Bhupesh-V/ugit${RESET}"
printf "Usage: %s [-h] [-v] [-u] [-g]\n" "ugit"
printf "ugit helps you undo git commands without much effort\n"
printf "Just run 'ugit' and search for what you want to undo\n\n"
printf "Available options:\n"
printf " -h, --help Print this help and exit\n"
printf " -v, --version Print current ugit version\n"
printf " -u, --update Update ugit\n"
printf " -g, --guide Open the ugit undo text guide\n\n"
printf "Contact 📬️: %s for assistance\n" "$(tput bold)varshneybhupesh@gmail.com${RESET}"
printf "Read the guide: %s\n" "https://til.bhupesh.me/git/how-to-undo-anything-in-git"
printf "Please give us a ⭐ if you liked ugit %s\n" "${BOLD_ORG_FG}https://github.com/Bhupesh-V/ugit${RESET}"
}
get_changelog() {
# get changelog/release notes for the most recent release
REMOTE_REPO="Bhupesh-V/ugit"
CHANGELOG=$(curl -s -L https://api.github.com/repos/$REMOTE_REPO/releases | awk -F=":" '/body/ {print $1;exit}' | cut -d ':' -f 2 | tr -d "\"")
printf "%s\n" "${BOLD}Changelog:${RESET}"
echo -e "${CHANGELOG#* }"
CHANGELOG=$(curl -s -L https://api.github.com/repos/$REMOTE_REPO/releases | awk -F=":" '/html_url/ {print $1;exit}' | cut -d ':' -f 2,3 | tr -d "\", ")
printf "Read Full Changelog: %s\n" "${BOLD}${CHANGELOG}${RESET}"
}
ugit_update() {
if [ -n "${UGIT_RUNNING_IN_DOCKER-}" ] && [ "$UGIT_RUNNING_IN_DOCKER" = true ]; then
printf "%s\n\n" "You are running version ${VERSION} of ugit via Docker. Please pull the latest docker image to update."
printf "\t%s\n" "${BOLD_ORG_FG}docker pull bhupeshimself/ugit${RESET}"
return
fi
printf "%s\n" "Checking for updates ..."
curl -s -L "$SCRIPT_URL" > "$TMP_FILE"
NEW_VER=$(grep "^VERSION" "$TMP_FILE" | awk -F'[="]' '{print $3}')
@ -405,7 +478,12 @@ ugit_update() {
}
open_guide() {
GUIDE="https://bhupesh.gitbook.io/notes/git/how-to-undo-anything-in-git"
GUIDE="https://til.bhupesh.me/git/how-to-undo-anything-in-git"
if [ -n "${UGIT_RUNNING_IN_DOCKER-}" ] && [ "$UGIT_RUNNING_IN_DOCKER" = true ]; then
printf "%s\n" "You can find how ugit does its magic at: ${BOLD_ORG_FG}${GUIDE}${RESET}"
return
fi
case "$OSTYPE" in
darwin*)
@ -463,7 +541,7 @@ main() {
check_deps
init_test
header
option=$(display_menu | nl -n ln | fzf --header="Don't worry we all mess up sometimes" --height 50% --ansi --reverse --pointer='👉' --cycle | awk '{print $1}')
option=$(display_menu | nl -n ln | fzf --header="Don't worry we all mess up sometimes" --height 50% --ansi --reverse "$pointer" --cycle | awk '{print $1}')
ugit_menu
fi
}

2
ugit-flatpak/.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
.flatpak-builder
build-dir

View file

@ -0,0 +1,45 @@
app-id: org.Bhupesh-V.ugit
runtime: org.freedesktop.Platform
runtime-version: '21.08'
sdk: org.freedesktop.Sdk
command: ugit
finish-args:
- --filesystem=home:rw
- --share=network
modules:
- name: fzf
buildsystem: simple
build-commands:
- tar -xvf fzf-0.33.0-linux_amd64.tar.gz
- install -Dm755 fzf ${FLATPAK_DEST}/bin/fzf
sources:
- type: file
url: https://github.com/junegunn/fzf/releases/download/0.33.0/fzf-0.33.0-linux_amd64.tar.gz
sha256: bcf2f4ba957cce15cea1546f48cdd3bfe9b5dc9a6e80ccc400314bda171466f3
- name: git
buildsystem: simple
build-commands:
- install -Dm755 $(which git) ${FLATPAK_DEST}/bin/
- install -Dm755 $(which git-cvsserver) ${FLATPAK_DEST}/bin/
- install -Dm755 $(which git-receive-pack) ${FLATPAK_DEST}/bin/
- install -Dm755 $(which git-shell) ${FLATPAK_DEST}/bin/
- install -Dm755 $(which git-upload-archive) ${FLATPAK_DEST}/bin/
- install -Dm755 $(which git-upload-pack) ${FLATPAK_DEST}/bin/
- name: ugit
buildsystem: simple
build-options:
build-commands:
- chmod +x ugit
- install -Dm755 ugit ${FLATPAK_DEST}/bin/ugit
- install -Dm755 org.Bhupesh-V.ugit.desktop ${FLATPAK_DEST}/share/applications/org.Bhupesh-V.ugit.desktop
sources:
- type: git
url: https://github.com/Bhupesh-V/ugit
tag: v5.3
commit: 14da50780e696e758bf362489496b74901f84cc1
- type: file
path: org.Bhupesh-V.ugit.desktop

View file

@ -0,0 +1,5 @@
[Desktop Entry]
Name=ugit
Exec=ugit
Type=Application
Terminal=true