Collection of scripts for Git aliasing
This repository makes use of Git Submodules to track dependencies, to avoid incomplete downloads clone with the --recurse-submodules option...
git clone --recurse-submodules [email protected]:git-utilities/link-alias.gitTo update tracked Git Submodules issue the following commands...
git pull
git submodule update --init --merge --recursiveTo force upgrade of Git Submodules...
git submodule update --init --merge --recursive --remoteNote, forcing and update of Git Submodule tracked dependencies may cause instabilities and/or merge conflicts; if however everything operates as expected after an update please consider submitting a Pull Request.
Clone
mkdir -p ~/git/hub/git-utilities
cd ~/git/hub/git-utilities
git clone --recurse-submodules [email protected]:git-utilities/link-alias.gitInstall
cd ~/git/hub/git-utilities/link-alias
make installUpgrade
cd ~/git/hub/git-utilities/link-alias
make upgradeUninstall
cd ~/git/hub/git-utilities/link-alias
make uninstallNote, uninstalling will remove symbolic links for
git-link-aliasscript but will not modify any Git alias configurations.
After installing git-link-alias the any script within the alias-scripts/ directory may be installed by name, eg...
git link-alias initScripts that may be linked via
git-link-aliasscript
Wrapper for git init command, merges .gitignore with .git/info/exclude
Example
<default_template>/info/exclude
node_modules
Note,
git config init.templateDirwill print the path to<default_template>, and may be used to modify the default template for initializing Git repositories, eg...cp -r /usr/share/git-core/templates ~/.git/templates/default git config init.templateDir "${HOME}/.git/templates/default"
By default the info/exclude file of templates and initialized repositories is not tracked by Git, this script will attempt to merge unique patterns with public .gitignore file for an initialized repository
git init repository-nameCheck the modified .gitignore file with preferred text viewer...
cat repository-name/.gitignore
#> node_modulesNote, if
--barecommand-line option is detected then no.gitignorefile is merged/written
This repository is not complete, Pull Requests that add features or fix bugs are certainly welcomed!
Depending upon host configurations tab-completion may not function as desired with aliased commands, the GitHub Gist -- The Ultimate Git Alias Setup may be useful for those utilizing Bash shell.
Options for contributing to link-alias and git-utilities
Start making a Fork of this repository to an account that you have write permissions for.
- Add remote for fork URL. The URL syntax is
[email protected]:<NAME>/<REPO>.git...
cd ~/git/hub/git-utilities/link-alias
git remote add fork [email protected]:<NAME>/link-alias.git- Commit your changes and push to your fork, eg. to fix an issue...
cd ~/git/hub/git-utilities/link-alias
git commit -F- <<'EOF'
:bug: Fixes #42 Issue
**Edits**
- `<SCRIPT-NAME>` script, fixes some bug reported in issue
EOF
git push fork mainNote, the
-uoption may be used to setforkas the default remote, eg.git push -u fork mainhowever, this will also default theforkremote for pulling from too! Meaning that pulling updates fromoriginmust be done explicitly, eg.git pull origin main
- Then on GitHub submit a Pull Request through the Web-UI, the URL syntax is
https://github.com/<NAME>/<REPO>/pull/new/<BRANCH>
Note; to decrease the chances of your Pull Request needing modifications before being accepted, please check the dot-github repository for detailed contributing guidelines.
Thanks for even considering it!
Via Liberapay you may on a repeating basis.
Regardless of if you're able to financially support projects such as link-alias that git-utilities maintains, please consider sharing projects that are useful with others, because one of the goals of maintaining Open Source repositories is to provide value to the community.
-
git help config -
git help alias
Collection of scripts for Git aliasing
Copyright (C) 2021 S0AndS0
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, version 3 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
For further details review full length version of AGPL-3.0 License.