You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "lhotari (via GitHub)" <gi...@apache.org> on 2024/03/05 14:13:47 UTC
[PR] Add more git tips to setup-mergetool.md [pulsar-site]
lhotari opened a new pull request, #824:
URL: https://github.com/apache/pulsar-site/pull/824
(no comment)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add more git tips to setup-mergetool.md [pulsar-site]
Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari commented on code in PR #824:
URL: https://github.com/apache/pulsar-site/pull/824#discussion_r1512971714
##########
contribute/setup-mergetool.md:
##########
@@ -90,6 +90,78 @@ sudo apt install git-gui
There are many tools available for this purpose, but `git gui` is one of the simplest and most effective.
+### Additional Git tuning
+
+#### Git configuration
+
+Increase default renamed file detection limit with mergetool and difftool
+```shell
+git config --global merge.renameLimit 2048
+git config --global diff.renameLimit 2048
+```
+
+Enable [rerere](https://git-scm.com/book/en/v2/Git-Tools-Rerere), "reuse recorded resolution" for Git.
+```shell
+git config --global rerere.enabled true
+```
+Notice! In some cases, it might be useful to disable rerere after an invalid merge resolution. In that case you will need to use `git rerere forget file` to forget the merge result.
+
+#### Install `tig` command line UI for git.
+
+`tig` is handy for viewing the git log and it can also be used for staging files and assisting with `git` command line usage.
+
+MacOS
+```shell
+brew install tig
+```
+
+Ubuntu Linux
+```shell
+sudo apt install tig
+```
+
+There are also other more feature rich alternatives such as [`gitui`](https://github.com/extrawurst/gitui) or [`lazygit`](https://github.com/jesseduffield/lazygit).
+
+#### Install `gh` command line tool for GitHub.
+
+Installing with `brew`, for other package managers, follow instructions at https://cli.github.com/.
+
+```shell
+brew install gh
+```
+
+After installing authenticate to GitHub
+```shell
+gh auth login
+```
+
+#### Checking out each maintenance branch in a separate working directory
+
+For maintaining Pulsar, it is handy to have all maintenance branches checked out in separate working directories
Review Comment:
I wasn't able to quickly find out what GitButler's virtual branch is in git. :) The git worktree is pretty amazing feature that some don't know of and it's essential for maintaining Pulsar.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add more git tips to setup-mergetool.md [pulsar-site]
Posted by "visortelle (via GitHub)" <gi...@apache.org>.
visortelle commented on code in PR #824:
URL: https://github.com/apache/pulsar-site/pull/824#discussion_r1512957875
##########
contribute/setup-mergetool.md:
##########
@@ -90,6 +90,78 @@ sudo apt install git-gui
There are many tools available for this purpose, but `git gui` is one of the simplest and most effective.
+### Additional Git tuning
+
+#### Git configuration
+
+Increase default renamed file detection limit with mergetool and difftool
+```shell
+git config --global merge.renameLimit 2048
+git config --global diff.renameLimit 2048
+```
+
+Enable [rerere](https://git-scm.com/book/en/v2/Git-Tools-Rerere), "reuse recorded resolution" for Git.
+```shell
+git config --global rerere.enabled true
+```
+Notice! In some cases, it might be useful to disable rerere after an invalid merge resolution. In that case you will need to use `git rerere forget file` to forget the merge result.
+
+#### Install `tig` command line UI for git.
+
+`tig` is handy for viewing the git log and it can also be used for staging files and assisting with `git` command line usage.
+
+MacOS
+```shell
+brew install tig
+```
+
+Ubuntu Linux
+```shell
+sudo apt install tig
+```
+
+There are also other more feature rich alternatives such as [`gitui`](https://github.com/extrawurst/gitui) or [`lazygit`](https://github.com/jesseduffield/lazygit).
+
+#### Install `gh` command line tool for GitHub.
+
+Installing with `brew`, for other package managers, follow instructions at https://cli.github.com/.
+
+```shell
+brew install gh
+```
+
+After installing authenticate to GitHub
+```shell
+gh auth login
+```
+
+#### Checking out each maintenance branch in a separate working directory
+
+For maintaining Pulsar, it is handy to have all maintenance branches checked out in separate working directories
Review Comment:
@lhotari FYI I haven't tried it yet, but there is a new project GitButler.
https://docs.gitbutler.com/features/virtual-branches
<img width="816" alt="Screenshot 2024-03-05 at 6 46 13 PM" src="https://github.com/apache/pulsar-site/assets/9302460/4eeb3686-4bac-467b-a369-d60e73165adc">
One of the GitHub co-founders and the Pro Git book author is a CEO.
https://www.linkedin.com/in/schacon/
<img width="589" alt="Screenshot 2024-03-05 at 6 48 03 PM" src="https://github.com/apache/pulsar-site/assets/9302460/2f5b09a3-69d0-4593-bbc8-73aaf67c5fab">
I heard that the tool is very opinionated and not fully compatible with the traditional git branching model.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add more git tips to setup-mergetool.md [pulsar-site]
Posted by "asafm (via GitHub)" <gi...@apache.org>.
asafm commented on PR #824:
URL: https://github.com/apache/pulsar-site/pull/824#issuecomment-1979245456
@lhotari I think it's more effective if people who have done the release and have all their experience would review this. @codelipenghui can recommend someone from his team
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add more git tips to setup-mergetool.md [pulsar-site]
Posted by "visortelle (via GitHub)" <gi...@apache.org>.
visortelle commented on code in PR #824:
URL: https://github.com/apache/pulsar-site/pull/824#discussion_r1512904094
##########
contribute/setup-mergetool.md:
##########
@@ -90,6 +90,78 @@ sudo apt install git-gui
There are many tools available for this purpose, but `git gui` is one of the simplest and most effective.
+### Additional Git tuning
+
+#### Git configuration
+
+Increase default renamed file detection limit with mergetool and difftool
+```shell
+git config --global merge.renameLimit 2048
+git config --global diff.renameLimit 2048
+```
+
+Enable [rerere](https://git-scm.com/book/en/v2/Git-Tools-Rerere), "reuse recorded resolution" for Git.
+```shell
+git config --global rerere.enabled true
Review Comment:
<img width="736" alt="Screenshot 2024-03-05 at 6 19 53 PM" src="https://github.com/apache/pulsar-site/assets/9302460/66fee9a8-2aa7-48b1-b45d-7e5eb9fa20f1">
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add more git tips to setup-mergetool.md [pulsar-site]
Posted by "visortelle (via GitHub)" <gi...@apache.org>.
visortelle commented on code in PR #824:
URL: https://github.com/apache/pulsar-site/pull/824#discussion_r1512957875
##########
contribute/setup-mergetool.md:
##########
@@ -90,6 +90,78 @@ sudo apt install git-gui
There are many tools available for this purpose, but `git gui` is one of the simplest and most effective.
+### Additional Git tuning
+
+#### Git configuration
+
+Increase default renamed file detection limit with mergetool and difftool
+```shell
+git config --global merge.renameLimit 2048
+git config --global diff.renameLimit 2048
+```
+
+Enable [rerere](https://git-scm.com/book/en/v2/Git-Tools-Rerere), "reuse recorded resolution" for Git.
+```shell
+git config --global rerere.enabled true
+```
+Notice! In some cases, it might be useful to disable rerere after an invalid merge resolution. In that case you will need to use `git rerere forget file` to forget the merge result.
+
+#### Install `tig` command line UI for git.
+
+`tig` is handy for viewing the git log and it can also be used for staging files and assisting with `git` command line usage.
+
+MacOS
+```shell
+brew install tig
+```
+
+Ubuntu Linux
+```shell
+sudo apt install tig
+```
+
+There are also other more feature rich alternatives such as [`gitui`](https://github.com/extrawurst/gitui) or [`lazygit`](https://github.com/jesseduffield/lazygit).
+
+#### Install `gh` command line tool for GitHub.
+
+Installing with `brew`, for other package managers, follow instructions at https://cli.github.com/.
+
+```shell
+brew install gh
+```
+
+After installing authenticate to GitHub
+```shell
+gh auth login
+```
+
+#### Checking out each maintenance branch in a separate working directory
+
+For maintaining Pulsar, it is handy to have all maintenance branches checked out in separate working directories
Review Comment:
@lhotari FYI I haven't tried it yet, but there is a new project GitButler.
https://docs.gitbutler.com/features/virtual-branches
<img width="816" alt="Screenshot 2024-03-05 at 6 46 13 PM" src="https://github.com/apache/pulsar-site/assets/9302460/4eeb3686-4bac-467b-a369-d60e73165adc">
Someone who calls himself a GitHub co-founder is a CEO.
https://www.linkedin.com/in/schacon/
<img width="589" alt="Screenshot 2024-03-05 at 6 48 03 PM" src="https://github.com/apache/pulsar-site/assets/9302460/2f5b09a3-69d0-4593-bbc8-73aaf67c5fab">
I heard that the tool is very opinionated and not fully compatible with traditional git branching model.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add more git tips to setup-mergetool.md [pulsar-site]
Posted by "visortelle (via GitHub)" <gi...@apache.org>.
visortelle commented on code in PR #824:
URL: https://github.com/apache/pulsar-site/pull/824#discussion_r1512957875
##########
contribute/setup-mergetool.md:
##########
@@ -90,6 +90,78 @@ sudo apt install git-gui
There are many tools available for this purpose, but `git gui` is one of the simplest and most effective.
+### Additional Git tuning
+
+#### Git configuration
+
+Increase default renamed file detection limit with mergetool and difftool
+```shell
+git config --global merge.renameLimit 2048
+git config --global diff.renameLimit 2048
+```
+
+Enable [rerere](https://git-scm.com/book/en/v2/Git-Tools-Rerere), "reuse recorded resolution" for Git.
+```shell
+git config --global rerere.enabled true
+```
+Notice! In some cases, it might be useful to disable rerere after an invalid merge resolution. In that case you will need to use `git rerere forget file` to forget the merge result.
+
+#### Install `tig` command line UI for git.
+
+`tig` is handy for viewing the git log and it can also be used for staging files and assisting with `git` command line usage.
+
+MacOS
+```shell
+brew install tig
+```
+
+Ubuntu Linux
+```shell
+sudo apt install tig
+```
+
+There are also other more feature rich alternatives such as [`gitui`](https://github.com/extrawurst/gitui) or [`lazygit`](https://github.com/jesseduffield/lazygit).
+
+#### Install `gh` command line tool for GitHub.
+
+Installing with `brew`, for other package managers, follow instructions at https://cli.github.com/.
+
+```shell
+brew install gh
+```
+
+After installing authenticate to GitHub
+```shell
+gh auth login
+```
+
+#### Checking out each maintenance branch in a separate working directory
+
+For maintaining Pulsar, it is handy to have all maintenance branches checked out in separate working directories
Review Comment:
@lhotari FYI I haven't tried it yet, but there is a new project GitButler.
https://docs.gitbutler.com/features/virtual-branches
<img width="816" alt="Screenshot 2024-03-05 at 6 46 13 PM" src="https://github.com/apache/pulsar-site/assets/9302460/4eeb3686-4bac-467b-a369-d60e73165adc">
One of the GitHub co-founders and the Pro Git book author is a CEO.
https://www.linkedin.com/in/schacon/
<img width="589" alt="Screenshot 2024-03-05 at 6 48 03 PM" src="https://github.com/apache/pulsar-site/assets/9302460/2f5b09a3-69d0-4593-bbc8-73aaf67c5fab">
I heard that the tool is opinionated and not fully compatible with the traditional git branching model.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add more git tips to setup-mergetool.md [pulsar-site]
Posted by "visortelle (via GitHub)" <gi...@apache.org>.
visortelle commented on code in PR #824:
URL: https://github.com/apache/pulsar-site/pull/824#discussion_r1512903123
##########
contribute/setup-mergetool.md:
##########
@@ -90,6 +90,78 @@ sudo apt install git-gui
There are many tools available for this purpose, but `git gui` is one of the simplest and most effective.
+### Additional Git tuning
+
+#### Git configuration
+
+Increase default renamed file detection limit with mergetool and difftool
+```shell
+git config --global merge.renameLimit 2048
+git config --global diff.renameLimit 2048
+```
+
+Enable [rerere](https://git-scm.com/book/en/v2/Git-Tools-Rerere), "reuse recorded resolution" for Git.
+```shell
+git config --global rerere.enabled true
Review Comment:
Would it make sense to commit the local git config to `<pulsar_repo_root>/.gitconfig` instead of configuring it globally for each user?
This way no need to do additional steps for users.
Also, some people work on multiple projects, I prefer to have all project-related stuff to be described as code in the project repository where possible.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add more git tips to setup-mergetool.md [pulsar-site]
Posted by "visortelle (via GitHub)" <gi...@apache.org>.
visortelle commented on code in PR #824:
URL: https://github.com/apache/pulsar-site/pull/824#discussion_r1512903123
##########
contribute/setup-mergetool.md:
##########
@@ -90,6 +90,78 @@ sudo apt install git-gui
There are many tools available for this purpose, but `git gui` is one of the simplest and most effective.
+### Additional Git tuning
+
+#### Git configuration
+
+Increase default renamed file detection limit with mergetool and difftool
+```shell
+git config --global merge.renameLimit 2048
+git config --global diff.renameLimit 2048
+```
+
+Enable [rerere](https://git-scm.com/book/en/v2/Git-Tools-Rerere), "reuse recorded resolution" for Git.
+```shell
+git config --global rerere.enabled true
Review Comment:
Would it make sense to commit the local git config to `<pulsar_repo_root>/.gitconfig` instead of configuring it globally?
This way no need to do additional steps for users.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add more git tips to setup-mergetool.md [pulsar-site]
Posted by "visortelle (via GitHub)" <gi...@apache.org>.
visortelle commented on code in PR #824:
URL: https://github.com/apache/pulsar-site/pull/824#discussion_r1512909507
##########
contribute/setup-mergetool.md:
##########
@@ -90,6 +90,78 @@ sudo apt install git-gui
There are many tools available for this purpose, but `git gui` is one of the simplest and most effective.
+### Additional Git tuning
+
+#### Git configuration
+
+Increase default renamed file detection limit with mergetool and difftool
+```shell
+git config --global merge.renameLimit 2048
+git config --global diff.renameLimit 2048
+```
+
+Enable [rerere](https://git-scm.com/book/en/v2/Git-Tools-Rerere), "reuse recorded resolution" for Git.
+```shell
+git config --global rerere.enabled true
Review Comment:
I also thought about using [Nix](https://nixos.org/) for all the dev tools and configuration.
We use it for our small projects without any issues. Same environment on the local machine and CI, and no need to install the proper versions of tools for each developer.
Downside - doesn't work on Windows without WSL.
Probably it's overkill if all you need is a proper Java version, just a suggestion.
The configuration file looks like this:
```nix
{
description = "Tools needed for X-Ray development.";
inputs = {
nixpkgs = {
url = "nixpkgs/nixos-unstable";
};
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
flake-utils = {
url = "github:numtide/flake-utils";
};
};
outputs =
{ self
, nixpkgs
, flake-compat
, flake-utils
,
} @ inputs:
flake-utils.lib.eachSystem
[
flake-utils.lib.system.x86_64-linux
flake-utils.lib.system.x86_64-darwin
flake-utils.lib.system.aarch64-linux
flake-utils.lib.system.aarch64-darwin
]
(
system:
let
inherit (nixpkgs) lib;
pkgs = import nixpkgs {
system = system;
config.allowBroken = true;
};
protoc-gen-grpc-web = pkgs.callPackage ./nix/protoc-gen-grpc-web.nix { };
protoc-gen-scala = pkgs.callPackage ./nix/protoc-gen-scala.nix { };
missingSysPkgs =
if pkgs.stdenv.isDarwin then
[
pkgs.darwin.apple_sdk.frameworks.Foundation
pkgs.darwin.libiconv
]
else
[ ];
runtimeLibraryPath = lib.makeLibraryPath ([ pkgs.zlib ]);
pulsar-ui-dev = pkgs.mkShell {
shellHook = ''
export JAVA_HOME=$(echo "$(which java)" | sed 's/\/bin\/java//g' )
export GRAAL_HOME=$JAVA_HOME
export NODE_OPTIONS=--max-old-space-size=4096
export LD_LIBRARY_PATH="${runtimeLibraryPath}"
source ./dev-env.sh
'';
packages = [
pkgs.gnumake
pkgs.coreutils
pkgs.nodejs-18_x
pkgs.graalvm-ce
pkgs.dotty
pkgs.scalafmt
pkgs.scalafix
pkgs.sbt
pkgs.maven
pkgs.protobuf3_20
pkgs.buf
protoc-gen-grpc-web
protoc-gen-scala
pkgs.pulumi-bin
pkgs.kubectl
pkgs.kubernetes-helm
pkgs.awscli2
pkgs.aws-iam-authenticator
pkgs.git
pkgs.git-lfs
pkgs.unzip
] ++ missingSysPkgs;
};
in
rec {
packages = { };
packages.default = pulsar-ui-dev;
devShells.default = pulsar-ui-dev;
devShell = devShells.default;
}
);
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Rename setup-mergetool.md to setup-git.md and add more git tips [pulsar-site]
Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari merged PR #824:
URL: https://github.com/apache/pulsar-site/pull/824
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add more git tips to setup-mergetool.md [pulsar-site]
Posted by "visortelle (via GitHub)" <gi...@apache.org>.
visortelle commented on code in PR #824:
URL: https://github.com/apache/pulsar-site/pull/824#discussion_r1512909507
##########
contribute/setup-mergetool.md:
##########
@@ -90,6 +90,78 @@ sudo apt install git-gui
There are many tools available for this purpose, but `git gui` is one of the simplest and most effective.
+### Additional Git tuning
+
+#### Git configuration
+
+Increase default renamed file detection limit with mergetool and difftool
+```shell
+git config --global merge.renameLimit 2048
+git config --global diff.renameLimit 2048
+```
+
+Enable [rerere](https://git-scm.com/book/en/v2/Git-Tools-Rerere), "reuse recorded resolution" for Git.
+```shell
+git config --global rerere.enabled true
Review Comment:
I also thought about using Nix for all the dev tools and configuration.
We use it for our small projects without any issues. Same environment on the local machine and CI, and no need to install the proper versions of tools for each developer.
Downside - doesn't work on Windows without WSL.
But probably it's overkill if all you need is a proper Java version.
The configuration file looks like this:
```nix
{
description = "Tools needed for X-Ray development.";
inputs = {
nixpkgs = {
url = "nixpkgs/nixos-unstable";
};
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
flake-utils = {
url = "github:numtide/flake-utils";
};
};
outputs =
{ self
, nixpkgs
, flake-compat
, flake-utils
,
} @ inputs:
flake-utils.lib.eachSystem
[
flake-utils.lib.system.x86_64-linux
flake-utils.lib.system.x86_64-darwin
flake-utils.lib.system.aarch64-linux
flake-utils.lib.system.aarch64-darwin
]
(
system:
let
inherit (nixpkgs) lib;
pkgs = import nixpkgs {
system = system;
config.allowBroken = true;
};
protoc-gen-grpc-web = pkgs.callPackage ./nix/protoc-gen-grpc-web.nix { };
protoc-gen-scala = pkgs.callPackage ./nix/protoc-gen-scala.nix { };
missingSysPkgs =
if pkgs.stdenv.isDarwin then
[
pkgs.darwin.apple_sdk.frameworks.Foundation
pkgs.darwin.libiconv
]
else
[ ];
runtimeLibraryPath = lib.makeLibraryPath ([ pkgs.zlib ]);
pulsar-ui-dev = pkgs.mkShell {
shellHook = ''
export JAVA_HOME=$(echo "$(which java)" | sed 's/\/bin\/java//g' )
export GRAAL_HOME=$JAVA_HOME
export NODE_OPTIONS=--max-old-space-size=4096
export LD_LIBRARY_PATH="${runtimeLibraryPath}"
source ./dev-env.sh
'';
packages = [
pkgs.gnumake
pkgs.coreutils
pkgs.nodejs-18_x
pkgs.graalvm-ce
pkgs.dotty
pkgs.scalafmt
pkgs.scalafix
pkgs.sbt
pkgs.maven
pkgs.protobuf3_20
pkgs.buf
protoc-gen-grpc-web
protoc-gen-scala
pkgs.pulumi-bin
pkgs.kubectl
pkgs.kubernetes-helm
pkgs.awscli2
pkgs.aws-iam-authenticator
pkgs.git
pkgs.git-lfs
pkgs.unzip
] ++ missingSysPkgs;
};
in
rec {
packages = { };
packages.default = pulsar-ui-dev;
devShells.default = pulsar-ui-dev;
devShell = devShells.default;
}
);
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add more git tips to setup-mergetool.md [pulsar-site]
Posted by "visortelle (via GitHub)" <gi...@apache.org>.
visortelle commented on code in PR #824:
URL: https://github.com/apache/pulsar-site/pull/824#discussion_r1512909507
##########
contribute/setup-mergetool.md:
##########
@@ -90,6 +90,78 @@ sudo apt install git-gui
There are many tools available for this purpose, but `git gui` is one of the simplest and most effective.
+### Additional Git tuning
+
+#### Git configuration
+
+Increase default renamed file detection limit with mergetool and difftool
+```shell
+git config --global merge.renameLimit 2048
+git config --global diff.renameLimit 2048
+```
+
+Enable [rerere](https://git-scm.com/book/en/v2/Git-Tools-Rerere), "reuse recorded resolution" for Git.
+```shell
+git config --global rerere.enabled true
Review Comment:
I also thought about using Nix for all the dev tools and configuration.
We use it for our small projects without any issues. Same environment on the local machine and CI, and no need to install the proper versions of tools for each developer.
But probably it's overkill if all you need is proper Java version.
The configuration file looks like:
```nix
{
description = "Tools needed for X-Ray development.";
inputs = {
nixpkgs = {
url = "nixpkgs/nixos-unstable";
};
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
flake-utils = {
url = "github:numtide/flake-utils";
};
};
outputs =
{ self
, nixpkgs
, flake-compat
, flake-utils
,
} @ inputs:
flake-utils.lib.eachSystem
[
flake-utils.lib.system.x86_64-linux
flake-utils.lib.system.x86_64-darwin
flake-utils.lib.system.aarch64-linux
flake-utils.lib.system.aarch64-darwin
]
(
system:
let
inherit (nixpkgs) lib;
pkgs = import nixpkgs {
system = system;
config.allowBroken = true;
};
protoc-gen-grpc-web = pkgs.callPackage ./nix/protoc-gen-grpc-web.nix { };
protoc-gen-scala = pkgs.callPackage ./nix/protoc-gen-scala.nix { };
missingSysPkgs =
if pkgs.stdenv.isDarwin then
[
pkgs.darwin.apple_sdk.frameworks.Foundation
pkgs.darwin.libiconv
]
else
[ ];
runtimeLibraryPath = lib.makeLibraryPath ([ pkgs.zlib ]);
pulsar-ui-dev = pkgs.mkShell {
shellHook = ''
export JAVA_HOME=$(echo "$(which java)" | sed 's/\/bin\/java//g' )
export GRAAL_HOME=$JAVA_HOME
export NODE_OPTIONS=--max-old-space-size=4096
export LD_LIBRARY_PATH="${runtimeLibraryPath}"
source ./dev-env.sh
'';
packages = [
pkgs.gnumake
pkgs.coreutils
pkgs.nodejs-18_x
pkgs.graalvm-ce
pkgs.dotty
pkgs.scalafmt
pkgs.scalafix
pkgs.sbt
pkgs.maven
pkgs.protobuf3_20
pkgs.buf
protoc-gen-grpc-web
protoc-gen-scala
pkgs.pulumi-bin
pkgs.kubectl
pkgs.kubernetes-helm
pkgs.awscli2
pkgs.aws-iam-authenticator
pkgs.git
pkgs.git-lfs
pkgs.unzip
] ++ missingSysPkgs;
};
in
rec {
packages = { };
packages.default = pulsar-ui-dev;
devShells.default = pulsar-ui-dev;
devShell = devShells.default;
}
);
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add more git tips to setup-mergetool.md [pulsar-site]
Posted by "visortelle (via GitHub)" <gi...@apache.org>.
visortelle commented on code in PR #824:
URL: https://github.com/apache/pulsar-site/pull/824#discussion_r1512909507
##########
contribute/setup-mergetool.md:
##########
@@ -90,6 +90,78 @@ sudo apt install git-gui
There are many tools available for this purpose, but `git gui` is one of the simplest and most effective.
+### Additional Git tuning
+
+#### Git configuration
+
+Increase default renamed file detection limit with mergetool and difftool
+```shell
+git config --global merge.renameLimit 2048
+git config --global diff.renameLimit 2048
+```
+
+Enable [rerere](https://git-scm.com/book/en/v2/Git-Tools-Rerere), "reuse recorded resolution" for Git.
+```shell
+git config --global rerere.enabled true
Review Comment:
I also thought about using [Nix](https://nixos.org/) for all the dev tools and configuration.
We use it for our small projects without any issues. Same environment on the local machine and CI, and no need to install the proper versions of tools for each developer.
Downside - doesn't work on Windows without WSL.
Probably it's overkill if all you need is a proper Java version, just a proposal.
The configuration file looks like this + version lock file:
```nix
{
description = "Tools needed for Pulsar UI development.";
inputs = {
nixpkgs = {
url = "nixpkgs/nixos-unstable";
};
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
flake-utils = {
url = "github:numtide/flake-utils";
};
};
outputs =
{ self
, nixpkgs
, flake-compat
, flake-utils
,
} @ inputs:
flake-utils.lib.eachSystem
[
flake-utils.lib.system.x86_64-linux
flake-utils.lib.system.x86_64-darwin
flake-utils.lib.system.aarch64-linux
flake-utils.lib.system.aarch64-darwin
]
(
system:
let
inherit (nixpkgs) lib;
pkgs = import nixpkgs {
system = system;
config.allowBroken = true;
};
protoc-gen-grpc-web = pkgs.callPackage ./nix/protoc-gen-grpc-web.nix { };
protoc-gen-scala = pkgs.callPackage ./nix/protoc-gen-scala.nix { };
missingSysPkgs =
if pkgs.stdenv.isDarwin then
[
pkgs.darwin.apple_sdk.frameworks.Foundation
pkgs.darwin.libiconv
]
else
[ ];
runtimeLibraryPath = lib.makeLibraryPath ([ pkgs.zlib ]);
pulsar-ui-dev = pkgs.mkShell {
shellHook = ''
export JAVA_HOME=$(echo "$(which java)" | sed 's/\/bin\/java//g' )
export GRAAL_HOME=$JAVA_HOME
export NODE_OPTIONS=--max-old-space-size=4096
export LD_LIBRARY_PATH="${runtimeLibraryPath}"
source ./dev-env.sh
'';
packages = [
pkgs.gnumake
pkgs.coreutils
pkgs.nodejs-18_x
pkgs.graalvm-ce
pkgs.dotty
pkgs.scalafmt
pkgs.scalafix
pkgs.sbt
pkgs.maven
pkgs.protobuf3_20
pkgs.buf
protoc-gen-grpc-web
protoc-gen-scala
pkgs.pulumi-bin
pkgs.kubectl
pkgs.kubernetes-helm
pkgs.awscli2
pkgs.aws-iam-authenticator
pkgs.git
pkgs.git-lfs
pkgs.unzip
] ++ missingSysPkgs;
};
in
rec {
packages = { };
packages.default = pulsar-ui-dev;
devShells.default = pulsar-ui-dev;
devShell = devShells.default;
}
);
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add more git tips to setup-mergetool.md [pulsar-site]
Posted by "visortelle (via GitHub)" <gi...@apache.org>.
visortelle commented on code in PR #824:
URL: https://github.com/apache/pulsar-site/pull/824#discussion_r1512957875
##########
contribute/setup-mergetool.md:
##########
@@ -90,6 +90,78 @@ sudo apt install git-gui
There are many tools available for this purpose, but `git gui` is one of the simplest and most effective.
+### Additional Git tuning
+
+#### Git configuration
+
+Increase default renamed file detection limit with mergetool and difftool
+```shell
+git config --global merge.renameLimit 2048
+git config --global diff.renameLimit 2048
+```
+
+Enable [rerere](https://git-scm.com/book/en/v2/Git-Tools-Rerere), "reuse recorded resolution" for Git.
+```shell
+git config --global rerere.enabled true
+```
+Notice! In some cases, it might be useful to disable rerere after an invalid merge resolution. In that case you will need to use `git rerere forget file` to forget the merge result.
+
+#### Install `tig` command line UI for git.
+
+`tig` is handy for viewing the git log and it can also be used for staging files and assisting with `git` command line usage.
+
+MacOS
+```shell
+brew install tig
+```
+
+Ubuntu Linux
+```shell
+sudo apt install tig
+```
+
+There are also other more feature rich alternatives such as [`gitui`](https://github.com/extrawurst/gitui) or [`lazygit`](https://github.com/jesseduffield/lazygit).
+
+#### Install `gh` command line tool for GitHub.
+
+Installing with `brew`, for other package managers, follow instructions at https://cli.github.com/.
+
+```shell
+brew install gh
+```
+
+After installing authenticate to GitHub
+```shell
+gh auth login
+```
+
+#### Checking out each maintenance branch in a separate working directory
+
+For maintaining Pulsar, it is handy to have all maintenance branches checked out in separate working directories
Review Comment:
@lhotari FYI I haven't tried it yet, but there is a new project GitButler.
https://docs.gitbutler.com/features/virtual-branches
<img width="816" alt="Screenshot 2024-03-05 at 6 46 13 PM" src="https://github.com/apache/pulsar-site/assets/9302460/4eeb3686-4bac-467b-a369-d60e73165adc">
Someone who calls himself a GitHub co-founder is a CEO.
https://www.linkedin.com/in/schacon/
<img width="589" alt="Screenshot 2024-03-05 at 6 48 03 PM" src="https://github.com/apache/pulsar-site/assets/9302460/2f5b09a3-69d0-4593-bbc8-73aaf67c5fab">
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add more git tips to setup-mergetool.md [pulsar-site]
Posted by "visortelle (via GitHub)" <gi...@apache.org>.
visortelle commented on code in PR #824:
URL: https://github.com/apache/pulsar-site/pull/824#discussion_r1512909507
##########
contribute/setup-mergetool.md:
##########
@@ -90,6 +90,78 @@ sudo apt install git-gui
There are many tools available for this purpose, but `git gui` is one of the simplest and most effective.
+### Additional Git tuning
+
+#### Git configuration
+
+Increase default renamed file detection limit with mergetool and difftool
+```shell
+git config --global merge.renameLimit 2048
+git config --global diff.renameLimit 2048
+```
+
+Enable [rerere](https://git-scm.com/book/en/v2/Git-Tools-Rerere), "reuse recorded resolution" for Git.
+```shell
+git config --global rerere.enabled true
Review Comment:
I also thought about using Nix for all the tooling.
We use it for our small projects without any issues. Same environment on the local machine and CI, and no need to install the proper versions of tools for each developer.
The configuration file looks like:
```
{
description = "Tools needed for X-Ray development.";
inputs = {
nixpkgs = {
url = "nixpkgs/nixos-unstable";
};
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
flake-utils = {
url = "github:numtide/flake-utils";
};
};
outputs =
{ self
, nixpkgs
, flake-compat
, flake-utils
,
} @ inputs:
flake-utils.lib.eachSystem
[
flake-utils.lib.system.x86_64-linux
flake-utils.lib.system.x86_64-darwin
flake-utils.lib.system.aarch64-linux
flake-utils.lib.system.aarch64-darwin
]
(
system:
let
inherit (nixpkgs) lib;
pkgs = import nixpkgs {
system = system;
config.allowBroken = true;
};
protoc-gen-grpc-web = pkgs.callPackage ./nix/protoc-gen-grpc-web.nix { };
protoc-gen-scala = pkgs.callPackage ./nix/protoc-gen-scala.nix { };
missingSysPkgs =
if pkgs.stdenv.isDarwin then
[
pkgs.darwin.apple_sdk.frameworks.Foundation
pkgs.darwin.libiconv
]
else
[ ];
runtimeLibraryPath = lib.makeLibraryPath ([ pkgs.zlib ]);
pulsar-ui-dev = pkgs.mkShell {
shellHook = ''
export JAVA_HOME=$(echo "$(which java)" | sed 's/\/bin\/java//g' )
export GRAAL_HOME=$JAVA_HOME
export NODE_OPTIONS=--max-old-space-size=4096
export LD_LIBRARY_PATH="${runtimeLibraryPath}"
source ./dev-env.sh
'';
packages = [
pkgs.gnumake
pkgs.coreutils
pkgs.nodejs-18_x
pkgs.graalvm-ce
pkgs.dotty
pkgs.scalafmt
pkgs.scalafix
pkgs.sbt
pkgs.maven
pkgs.protobuf3_20
pkgs.buf
protoc-gen-grpc-web
protoc-gen-scala
pkgs.pulumi-bin
pkgs.kubectl
pkgs.kubernetes-helm
pkgs.awscli2
pkgs.aws-iam-authenticator
pkgs.git
pkgs.git-lfs
pkgs.unzip
] ++ missingSysPkgs;
};
in
rec {
packages = { };
packages.default = pulsar-ui-dev;
devShells.default = pulsar-ui-dev;
devShell = devShells.default;
}
);
}
```
##########
contribute/setup-mergetool.md:
##########
@@ -90,6 +90,78 @@ sudo apt install git-gui
There are many tools available for this purpose, but `git gui` is one of the simplest and most effective.
+### Additional Git tuning
+
+#### Git configuration
+
+Increase default renamed file detection limit with mergetool and difftool
+```shell
+git config --global merge.renameLimit 2048
+git config --global diff.renameLimit 2048
+```
+
+Enable [rerere](https://git-scm.com/book/en/v2/Git-Tools-Rerere), "reuse recorded resolution" for Git.
+```shell
+git config --global rerere.enabled true
Review Comment:
I also thought about using Nix for all the tooling.
We use it for our small projects without any issues. Same environment on the local machine and CI, and no need to install the proper versions of tools for each developer.
The configuration file looks like:
```nix
{
description = "Tools needed for X-Ray development.";
inputs = {
nixpkgs = {
url = "nixpkgs/nixos-unstable";
};
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
flake-utils = {
url = "github:numtide/flake-utils";
};
};
outputs =
{ self
, nixpkgs
, flake-compat
, flake-utils
,
} @ inputs:
flake-utils.lib.eachSystem
[
flake-utils.lib.system.x86_64-linux
flake-utils.lib.system.x86_64-darwin
flake-utils.lib.system.aarch64-linux
flake-utils.lib.system.aarch64-darwin
]
(
system:
let
inherit (nixpkgs) lib;
pkgs = import nixpkgs {
system = system;
config.allowBroken = true;
};
protoc-gen-grpc-web = pkgs.callPackage ./nix/protoc-gen-grpc-web.nix { };
protoc-gen-scala = pkgs.callPackage ./nix/protoc-gen-scala.nix { };
missingSysPkgs =
if pkgs.stdenv.isDarwin then
[
pkgs.darwin.apple_sdk.frameworks.Foundation
pkgs.darwin.libiconv
]
else
[ ];
runtimeLibraryPath = lib.makeLibraryPath ([ pkgs.zlib ]);
pulsar-ui-dev = pkgs.mkShell {
shellHook = ''
export JAVA_HOME=$(echo "$(which java)" | sed 's/\/bin\/java//g' )
export GRAAL_HOME=$JAVA_HOME
export NODE_OPTIONS=--max-old-space-size=4096
export LD_LIBRARY_PATH="${runtimeLibraryPath}"
source ./dev-env.sh
'';
packages = [
pkgs.gnumake
pkgs.coreutils
pkgs.nodejs-18_x
pkgs.graalvm-ce
pkgs.dotty
pkgs.scalafmt
pkgs.scalafix
pkgs.sbt
pkgs.maven
pkgs.protobuf3_20
pkgs.buf
protoc-gen-grpc-web
protoc-gen-scala
pkgs.pulumi-bin
pkgs.kubectl
pkgs.kubernetes-helm
pkgs.awscli2
pkgs.aws-iam-authenticator
pkgs.git
pkgs.git-lfs
pkgs.unzip
] ++ missingSysPkgs;
};
in
rec {
packages = { };
packages.default = pulsar-ui-dev;
devShells.default = pulsar-ui-dev;
devShell = devShells.default;
}
);
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add more git tips to setup-mergetool.md [pulsar-site]
Posted by "visortelle (via GitHub)" <gi...@apache.org>.
visortelle commented on code in PR #824:
URL: https://github.com/apache/pulsar-site/pull/824#discussion_r1512909507
##########
contribute/setup-mergetool.md:
##########
@@ -90,6 +90,78 @@ sudo apt install git-gui
There are many tools available for this purpose, but `git gui` is one of the simplest and most effective.
+### Additional Git tuning
+
+#### Git configuration
+
+Increase default renamed file detection limit with mergetool and difftool
+```shell
+git config --global merge.renameLimit 2048
+git config --global diff.renameLimit 2048
+```
+
+Enable [rerere](https://git-scm.com/book/en/v2/Git-Tools-Rerere), "reuse recorded resolution" for Git.
+```shell
+git config --global rerere.enabled true
Review Comment:
I also thought about using Nix for all the dev tools and configuration.
We use it for our small projects without any issues. Same environment on the local machine and CI, and no need to install the proper versions of tools for each developer.
Downside - doesn't work on Windows without WSL.
Probably it's overkill if all you need is a proper Java version, just a suggestion.
The configuration file looks like this:
```nix
{
description = "Tools needed for X-Ray development.";
inputs = {
nixpkgs = {
url = "nixpkgs/nixos-unstable";
};
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
flake-utils = {
url = "github:numtide/flake-utils";
};
};
outputs =
{ self
, nixpkgs
, flake-compat
, flake-utils
,
} @ inputs:
flake-utils.lib.eachSystem
[
flake-utils.lib.system.x86_64-linux
flake-utils.lib.system.x86_64-darwin
flake-utils.lib.system.aarch64-linux
flake-utils.lib.system.aarch64-darwin
]
(
system:
let
inherit (nixpkgs) lib;
pkgs = import nixpkgs {
system = system;
config.allowBroken = true;
};
protoc-gen-grpc-web = pkgs.callPackage ./nix/protoc-gen-grpc-web.nix { };
protoc-gen-scala = pkgs.callPackage ./nix/protoc-gen-scala.nix { };
missingSysPkgs =
if pkgs.stdenv.isDarwin then
[
pkgs.darwin.apple_sdk.frameworks.Foundation
pkgs.darwin.libiconv
]
else
[ ];
runtimeLibraryPath = lib.makeLibraryPath ([ pkgs.zlib ]);
pulsar-ui-dev = pkgs.mkShell {
shellHook = ''
export JAVA_HOME=$(echo "$(which java)" | sed 's/\/bin\/java//g' )
export GRAAL_HOME=$JAVA_HOME
export NODE_OPTIONS=--max-old-space-size=4096
export LD_LIBRARY_PATH="${runtimeLibraryPath}"
source ./dev-env.sh
'';
packages = [
pkgs.gnumake
pkgs.coreutils
pkgs.nodejs-18_x
pkgs.graalvm-ce
pkgs.dotty
pkgs.scalafmt
pkgs.scalafix
pkgs.sbt
pkgs.maven
pkgs.protobuf3_20
pkgs.buf
protoc-gen-grpc-web
protoc-gen-scala
pkgs.pulumi-bin
pkgs.kubectl
pkgs.kubernetes-helm
pkgs.awscli2
pkgs.aws-iam-authenticator
pkgs.git
pkgs.git-lfs
pkgs.unzip
] ++ missingSysPkgs;
};
in
rec {
packages = { };
packages.default = pulsar-ui-dev;
devShells.default = pulsar-ui-dev;
devShell = devShells.default;
}
);
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add more git tips to setup-mergetool.md [pulsar-site]
Posted by "visortelle (via GitHub)" <gi...@apache.org>.
visortelle commented on code in PR #824:
URL: https://github.com/apache/pulsar-site/pull/824#discussion_r1512909507
##########
contribute/setup-mergetool.md:
##########
@@ -90,6 +90,78 @@ sudo apt install git-gui
There are many tools available for this purpose, but `git gui` is one of the simplest and most effective.
+### Additional Git tuning
+
+#### Git configuration
+
+Increase default renamed file detection limit with mergetool and difftool
+```shell
+git config --global merge.renameLimit 2048
+git config --global diff.renameLimit 2048
+```
+
+Enable [rerere](https://git-scm.com/book/en/v2/Git-Tools-Rerere), "reuse recorded resolution" for Git.
+```shell
+git config --global rerere.enabled true
Review Comment:
I also thought about using [Nix](https://nixos.org/) for all the dev tools and configuration.
We use it for our small projects without any issues. Same environment on the local machine and CI, and no need to install the proper versions of tools for each developer.
Downside - doesn't work on Windows without WSL.
Probably it's overkill if all you need is a proper Java version, just a proposal.
The configuration file looks like this:
```nix
{
description = "Tools needed for X-Ray development.";
inputs = {
nixpkgs = {
url = "nixpkgs/nixos-unstable";
};
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
flake-utils = {
url = "github:numtide/flake-utils";
};
};
outputs =
{ self
, nixpkgs
, flake-compat
, flake-utils
,
} @ inputs:
flake-utils.lib.eachSystem
[
flake-utils.lib.system.x86_64-linux
flake-utils.lib.system.x86_64-darwin
flake-utils.lib.system.aarch64-linux
flake-utils.lib.system.aarch64-darwin
]
(
system:
let
inherit (nixpkgs) lib;
pkgs = import nixpkgs {
system = system;
config.allowBroken = true;
};
protoc-gen-grpc-web = pkgs.callPackage ./nix/protoc-gen-grpc-web.nix { };
protoc-gen-scala = pkgs.callPackage ./nix/protoc-gen-scala.nix { };
missingSysPkgs =
if pkgs.stdenv.isDarwin then
[
pkgs.darwin.apple_sdk.frameworks.Foundation
pkgs.darwin.libiconv
]
else
[ ];
runtimeLibraryPath = lib.makeLibraryPath ([ pkgs.zlib ]);
pulsar-ui-dev = pkgs.mkShell {
shellHook = ''
export JAVA_HOME=$(echo "$(which java)" | sed 's/\/bin\/java//g' )
export GRAAL_HOME=$JAVA_HOME
export NODE_OPTIONS=--max-old-space-size=4096
export LD_LIBRARY_PATH="${runtimeLibraryPath}"
source ./dev-env.sh
'';
packages = [
pkgs.gnumake
pkgs.coreutils
pkgs.nodejs-18_x
pkgs.graalvm-ce
pkgs.dotty
pkgs.scalafmt
pkgs.scalafix
pkgs.sbt
pkgs.maven
pkgs.protobuf3_20
pkgs.buf
protoc-gen-grpc-web
protoc-gen-scala
pkgs.pulumi-bin
pkgs.kubectl
pkgs.kubernetes-helm
pkgs.awscli2
pkgs.aws-iam-authenticator
pkgs.git
pkgs.git-lfs
pkgs.unzip
] ++ missingSysPkgs;
};
in
rec {
packages = { };
packages.default = pulsar-ui-dev;
devShells.default = pulsar-ui-dev;
devShell = devShells.default;
}
);
}
```
##########
contribute/setup-mergetool.md:
##########
@@ -90,6 +90,78 @@ sudo apt install git-gui
There are many tools available for this purpose, but `git gui` is one of the simplest and most effective.
+### Additional Git tuning
+
+#### Git configuration
+
+Increase default renamed file detection limit with mergetool and difftool
+```shell
+git config --global merge.renameLimit 2048
+git config --global diff.renameLimit 2048
+```
+
+Enable [rerere](https://git-scm.com/book/en/v2/Git-Tools-Rerere), "reuse recorded resolution" for Git.
+```shell
+git config --global rerere.enabled true
Review Comment:
I also thought about using [Nix](https://nixos.org/) for all the dev tools and configuration.
We use it for our small projects without any issues. Same environment on the local machine and CI, and no need to install the proper versions of tools for each developer.
Downside - doesn't work on Windows without WSL.
Probably it's overkill if all you need is a proper Java version, just a proposal.
The configuration file looks like this:
```nix
{
description = "Tools needed for Pulsar UI development.";
inputs = {
nixpkgs = {
url = "nixpkgs/nixos-unstable";
};
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
flake-utils = {
url = "github:numtide/flake-utils";
};
};
outputs =
{ self
, nixpkgs
, flake-compat
, flake-utils
,
} @ inputs:
flake-utils.lib.eachSystem
[
flake-utils.lib.system.x86_64-linux
flake-utils.lib.system.x86_64-darwin
flake-utils.lib.system.aarch64-linux
flake-utils.lib.system.aarch64-darwin
]
(
system:
let
inherit (nixpkgs) lib;
pkgs = import nixpkgs {
system = system;
config.allowBroken = true;
};
protoc-gen-grpc-web = pkgs.callPackage ./nix/protoc-gen-grpc-web.nix { };
protoc-gen-scala = pkgs.callPackage ./nix/protoc-gen-scala.nix { };
missingSysPkgs =
if pkgs.stdenv.isDarwin then
[
pkgs.darwin.apple_sdk.frameworks.Foundation
pkgs.darwin.libiconv
]
else
[ ];
runtimeLibraryPath = lib.makeLibraryPath ([ pkgs.zlib ]);
pulsar-ui-dev = pkgs.mkShell {
shellHook = ''
export JAVA_HOME=$(echo "$(which java)" | sed 's/\/bin\/java//g' )
export GRAAL_HOME=$JAVA_HOME
export NODE_OPTIONS=--max-old-space-size=4096
export LD_LIBRARY_PATH="${runtimeLibraryPath}"
source ./dev-env.sh
'';
packages = [
pkgs.gnumake
pkgs.coreutils
pkgs.nodejs-18_x
pkgs.graalvm-ce
pkgs.dotty
pkgs.scalafmt
pkgs.scalafix
pkgs.sbt
pkgs.maven
pkgs.protobuf3_20
pkgs.buf
protoc-gen-grpc-web
protoc-gen-scala
pkgs.pulumi-bin
pkgs.kubectl
pkgs.kubernetes-helm
pkgs.awscli2
pkgs.aws-iam-authenticator
pkgs.git
pkgs.git-lfs
pkgs.unzip
] ++ missingSysPkgs;
};
in
rec {
packages = { };
packages.default = pulsar-ui-dev;
devShells.default = pulsar-ui-dev;
devShell = devShells.default;
}
);
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add more git tips to setup-mergetool.md [pulsar-site]
Posted by "visortelle (via GitHub)" <gi...@apache.org>.
visortelle commented on code in PR #824:
URL: https://github.com/apache/pulsar-site/pull/824#discussion_r1512903123
##########
contribute/setup-mergetool.md:
##########
@@ -90,6 +90,78 @@ sudo apt install git-gui
There are many tools available for this purpose, but `git gui` is one of the simplest and most effective.
+### Additional Git tuning
+
+#### Git configuration
+
+Increase default renamed file detection limit with mergetool and difftool
+```shell
+git config --global merge.renameLimit 2048
+git config --global diff.renameLimit 2048
+```
+
+Enable [rerere](https://git-scm.com/book/en/v2/Git-Tools-Rerere), "reuse recorded resolution" for Git.
+```shell
+git config --global rerere.enabled true
Review Comment:
Would it make sense to commit the local git config to `<pulsar_repo_root>/.gitconfig` instead of configuring it globally for each user?
This way no need to do additional steps for users.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add more git tips to setup-mergetool.md [pulsar-site]
Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari commented on code in PR #824:
URL: https://github.com/apache/pulsar-site/pull/824#discussion_r1512978470
##########
contribute/setup-mergetool.md:
##########
@@ -90,6 +90,78 @@ sudo apt install git-gui
There are many tools available for this purpose, but `git gui` is one of the simplest and most effective.
+### Additional Git tuning
+
+#### Git configuration
+
+Increase default renamed file detection limit with mergetool and difftool
+```shell
+git config --global merge.renameLimit 2048
+git config --global diff.renameLimit 2048
+```
+
+Enable [rerere](https://git-scm.com/book/en/v2/Git-Tools-Rerere), "reuse recorded resolution" for Git.
+```shell
+git config --global rerere.enabled true
Review Comment:
> Would it make sense to commit the local git config to `<pulsar_repo_root>/.gitconfig` instead of configuring it globally for each user?
I think it's better that everyone handles their git config since usually there are environment specific settings and it would be a rabbit hole to start holding everyone by hand in every single problem. My goal is to give some advice and tips for the ones that are currently using unproductive ways. Some might have been doing this for 10 years or more without thinking of better ways.
There are a lot of different tastes for development tooling and it's really hard to say that everyone must be using the same tools or git configuration.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add more git tips to setup-mergetool.md [pulsar-site]
Posted by "visortelle (via GitHub)" <gi...@apache.org>.
visortelle commented on code in PR #824:
URL: https://github.com/apache/pulsar-site/pull/824#discussion_r1512957875
##########
contribute/setup-mergetool.md:
##########
@@ -90,6 +90,78 @@ sudo apt install git-gui
There are many tools available for this purpose, but `git gui` is one of the simplest and most effective.
+### Additional Git tuning
+
+#### Git configuration
+
+Increase default renamed file detection limit with mergetool and difftool
+```shell
+git config --global merge.renameLimit 2048
+git config --global diff.renameLimit 2048
+```
+
+Enable [rerere](https://git-scm.com/book/en/v2/Git-Tools-Rerere), "reuse recorded resolution" for Git.
+```shell
+git config --global rerere.enabled true
+```
+Notice! In some cases, it might be useful to disable rerere after an invalid merge resolution. In that case you will need to use `git rerere forget file` to forget the merge result.
+
+#### Install `tig` command line UI for git.
+
+`tig` is handy for viewing the git log and it can also be used for staging files and assisting with `git` command line usage.
+
+MacOS
+```shell
+brew install tig
+```
+
+Ubuntu Linux
+```shell
+sudo apt install tig
+```
+
+There are also other more feature rich alternatives such as [`gitui`](https://github.com/extrawurst/gitui) or [`lazygit`](https://github.com/jesseduffield/lazygit).
+
+#### Install `gh` command line tool for GitHub.
+
+Installing with `brew`, for other package managers, follow instructions at https://cli.github.com/.
+
+```shell
+brew install gh
+```
+
+After installing authenticate to GitHub
+```shell
+gh auth login
+```
+
+#### Checking out each maintenance branch in a separate working directory
+
+For maintaining Pulsar, it is handy to have all maintenance branches checked out in separate working directories
Review Comment:
@lhotari FYI I haven't tried it yet, but there is a new project GitButler.
https://docs.gitbutler.com/features/virtual-branches
<img width="816" alt="Screenshot 2024-03-05 at 6 46 13 PM" src="https://github.com/apache/pulsar-site/assets/9302460/4eeb3686-4bac-467b-a369-d60e73165adc">
One of the GitHub co-founders is a CEO.
https://www.linkedin.com/in/schacon/
<img width="589" alt="Screenshot 2024-03-05 at 6 48 03 PM" src="https://github.com/apache/pulsar-site/assets/9302460/2f5b09a3-69d0-4593-bbc8-73aaf67c5fab">
I heard that the tool is very opinionated and not fully compatible with the traditional git branching model.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add more git tips to setup-mergetool.md [pulsar-site]
Posted by "visortelle (via GitHub)" <gi...@apache.org>.
visortelle commented on PR #824:
URL: https://github.com/apache/pulsar-site/pull/824#issuecomment-1979012207
> Perhaps we need to reorganize the content and add another page for this information?
If we keep the `setup-mergetool.md` page name, then agree, it is better to create new `git-tips.md` page for tip not related directly to mergetool setup.
Another option is to have a single `git-setup.md` page.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org