Git
Appearance
GitHub
- Creating a Pull Request
$ git remote --verbose origin git@github.com:musinsky/QualityControl.git (fetch) origin git@github.com:musinsky/QualityControl.git (push) $ git checkout -b ctp-2026-04-08 Switched to a new branch 'ctp-2026-04-08' $ git add Modules/CTP/src/RawDataReaderCheck.cxx $ git commit -m "[CTP] fix quality result for empty histogram" [ctp-2026-04-08 3cd12473] [CTP] fix quality result for empty histogram 1 file changed, 3 insertions(+) $ git push --set-upstream origin ctp-2026-04-08 Enumerating objects: 11, done. Counting objects: 100% (11/11), done. Delta compression using up to 12 threads Compressing objects: 100% (6/6), done. Writing objects: 100% (6/6), 575 bytes | 575.00 KiB/s, done. Total 6 (delta 5), reused 0 (delta 0), pack-reused 0 (from 0) remote: Resolving deltas: 100% (5/5), completed with 5 local objects. remote: remote: Create a pull request for 'ctp-2026-04-08' on GitHub by visiting: remote: https://github.com/musinsky/QualityControl/pull/new/ctp-2026-04-08 remote: To github.com:musinsky/QualityControl.git * [new branch] ctp-2026-04-08 -> ctp-2026-04-08 branch 'ctp-2026-04-08' set up to track 'origin/ctp-2026-04-08'. Creating (Open) Pull request via GitHub pages
- Deleting branch (locally and remotely)
Pull request successfully merged and closed (info on forked GitHub page) You're all set — thectp-2026-04-08branch can be safely deleted. If you wish, you can also delete this fork of AliceO2Group/QualityControl in the settings. ("nestlacam" moznost "Delete branch") $ git status On branch ctp-2026-04-08 Your branch is up to date with 'origin/ctp-2026-04-08'. nothing to commit, working tree clean $ git checkout master Switched to branch 'master' Your branch is up to date with 'origin/master'. # Delete local $ git branch --delete ctp-2026-04-08 # or --delete --force (aka-D) warning: deleting branch 'ctp-2026-04-08' that has been merged to 'refs/remotes/origin/ctp-2026-04-08', but not yet merged to HEAD Deleted branch ctp-2026-04-08 (was 3cd12473). # Delete remote $ git push --delete origin ctp-2026-04-08 To github.com:musinsky/QualityControl.git - [deleted] ctp-2026-04-08 Pull request successfully merged and closed (info on forked GitHub page) You're all set — the branch has been merged. (zmizla moznost "Delete branch") # git fetch --all --prune # potrebne na "inom PC"
2026-04
$ curl --location https://github.com/musinsky/config/blob/master/yum.repos.d/vscode.repo?raw=true
$ curl https://raw.githubusercontent.com/musinsky/config/master/yum.repos.d/vscode.repo
https://raw.githubusercontent.com/<USER>/<REPO>/<BRANCH>/path/to/file
$ curl https://raw.githubusercontent.com/musinsky/config/refs/heads/master/yum.repos.d/vscode.repo
2023-04-03
# rename branch 'master' to 'rawhide' (on GitHub) git branch -m master rawhide git fetch origin git branch -u origin/rawhide rawhide git remote set-head origin -a
2021-11-25
https://github.com/{owner}/{repo}/archive/{ref}.tar.gzhttps://github.com/{owner}/{repo}/archive/{ref}.zip
|
https://github.com/{owner}/{repo}/tarball/{ref}https://github.com/{owner}/{repo}/zipball/{ref}
|
$ wget https://github.com/xrootd/xrootd/archive/master.tar.gz --2021-11-24 17:24:40-- https://codeload.github.com/xrootd/xrootd/tar.gz/master 2021-11-24 17:24:41 (5.01 MB/s) - ‘master.tar.gz’ saved [3109178] $ tar -tzf master.tar.gz | head -1 xrootd-master/ |
$ wget https://github.com/xrootd/xrootd/tarball/master --2021-11-24 16:50:30-- https://codeload.github.com/xrootd/xrootd/legacy.tar.gz/master 2021-11-24 16:50:31 (6.19 MB/s) - ‘master’ saved [3109792] $ tar -tzf master | head -1 xrootd-xrootd-6f72836/ |
$ wget https://github.com/xrootd/xrootd/archive/v4.12.8.tar.gz --2021-11-24 17:30:48-- https://codeload.github.com/xrootd/xrootd/tar.gz/v4.12.8 2021-11-24 17:30:49 (5.73 MB/s) - ‘v4.12.8.tar.gz’ saved [2615174] $ tar -tzf v4.12.8.tar.gz | head -1 xrootd-4.12.8/ |
$ wget https://github.com/xrootd/xrootd/tarball/v4.12.8 --2021-11-24 16:51:56-- https://codeload.github.com/xrootd/xrootd/legacy.tar.gz/v4.12.8 2021-11-24 16:51:57 (6.01 MB/s) - ‘v4.12.8’ saved [2615393] $ tar -tzf v4.12.8 | head -1 xrootd-xrootd-58898a7/ |
$ wget https://github.com/root-project/root/archive/v5-34-00-patches.tar.gz --2021-11-24 17:10:32-- https://codeload.github.com/root-project/root/tar.gz/v5-34-00-patches 2021-11-24 17:10:38 (11.7 MB/s) - ‘v5-34-00-patches.tar.gz’ saved [75603149] $ tar -tzf v5-34-00-patches.tar.gz | head -1 root-5-34-00-patches/ |
$ wget https://github.com/root-project/root/tarball/v5-34-00-patches --2021-11-24 17:09:42-- https://codeload.github.com/root-project/root/legacy.tar.gz/v5-34-00-patches 2021-11-24 17:09:49 (12.0 MB/s) - ‘v5-34-00-patches’ saved [75607400] $ tar -tzf v5-34-00-patches | head -1 root-project-root-36f558c/ |
$ wget https://github.com/musinsky/config/archive/6488e91.tar.gz --2021-11-25 15:17:09-- https://codeload.github.com/musinsky/config/tar.gz/6488e9112f3329a09ee79d9a476c2edd5f5f6165 2021-11-25 15:17:10 (11.0 MB/s) - ‘6488e91.tar.gz’ saved [2634769] $ tar -tzf 6488e91.tar.gz | head -1 config-6488e9112f3329a09ee79d9a476c2edd5f5f6165/ |
$ wget https://github.com/musinsky/config/tarball/6488e91 --2021-11-25 15:20:12-- https://codeload.github.com/musinsky/config/legacy.tar.gz/6488e9112f3329a09ee79d9a476c2edd5f5f6165 2021-11-25 15:20:13 (8.90 MB/s) - ‘6488e91’ saved [2634725] $ tar -tzf 6488e91 | head -1 musinsky-config-6488e91/ |
pred
2020-05-03
- reset repo do povodneho stavu, resp. ako je na origin=github.com
git fetch origin # checking github git reset --hard origin/master git clean -n -d # dry-run git clean -f -d git status --ignored git clean -n -x -d # dry-run git clean -f -x -d
2023-11-21
2019-03-22
[musinsky@strela ~]$ git clone git@github.com:musinsky/root.git Cloning into 'root'... [musinsky@strela root]$ git status On branch master Your branch is up to date with 'origin/master'. nothing to commit, working tree clean [musinsky@strela root]$ git remote -v origin git@github.com:musinsky/root.git (fetch) origin git@github.com:musinsky/root.git (push) [musinsky@strela root]$ git remote add upstream https://github.com/root-project/root.git [musinsky@strela root]$ git remote -v origin git@github.com:musinsky/root.git (fetch) origin git@github.com:musinsky/root.git (push) upstream https://github.com/root-project/root.git (fetch) upstream https://github.com/root-project/root.git (push) [musinsky@strela root]$ git branch * master [musinsky@strela root]$ git fetch upstream remote: Enumerating objects: 11893, done. remote: Counting objects: 100% (11893/11893), done. remote: Compressing objects: 100% (40/40), done. remote: Total 38637 (delta 11862), reused 11865 (delta 11852), pack-reused 26744 Receiving objects: 100% (38637/38637), 34.84 MiB | 22.59 MiB/s, done. Resolving deltas: 100% (27000/27000), completed with 2554 local objects. From https://github.com/root-project/root * [new branch] master -> upstream/master * [new branch] v5-34-00-patches -> upstream/v5-34-00-patches * [new branch] v6-06-00-patches -> upstream/v6-06-00-patches * [new branch] v6-08-00-patches -> upstream/v6-08-00-patches * [new branch] v6-10-00-patches -> upstream/v6-10-00-patches * [new branch] v6-12-00-patches -> upstream/v6-12-00-patches * [new branch] v6-14-00-patches -> upstream/v6-14-00-patches * [new branch] v6-16-00-patches -> upstream/v6-16-00-patches * [new tag] v3-10-02-patches -> v3-10-02-patches * [new tag] v4-00-08-patches -> v4-00-08-patches * [new tag] v4-03-04-patches -> v4-03-04-patches * [new tag] v4-04-02-patches -> v4-04-02-patches * [new tag] v5-08-00-patches -> v5-08-00-patches * [new tag] v5-10-00-patches -> v5-10-00-patches * [new tag] v5-12-00-patches -> v5-12-00-patches * [new tag] v5-13-04-patches -> v5-13-04-patches * [new tag] v5-14-00-patches -> v5-14-00-patches * [new tag] v5-18-00-patches -> v5-18-00-patches * [new tag] v5-20-00-patches -> v5-20-00-patches * [new tag] v5-22-00-patches -> v5-22-00-patches * [new tag] v5-24-00-patches -> v5-24-00-patches * [new tag] v5-26-00-patches -> v5-26-00-patches * [new tag] v5-27-06-patches -> v5-27-06-patches * [new tag] v5-28-00-patches -> v5-28-00-patches * [new tag] v5-30-00-patches -> v5-30-00-patches * [new tag] v5-32-00-patches -> v5-32-00-patches * [new tag] v6-00-00-patches -> v6-00-00-patches * [new tag] v6-02-00-patches -> v6-02-00-patches * [new tag] v6-04-00-patches -> v6-04-00-patches * [new tag] v6-13-04 -> v6-13-04 * [new tag] v6-13-06 -> v6-13-06 * [new tag] v6-13-08 -> v6-13-08 * [new tag] v6-14-00 -> v6-14-00 * [new tag] v6-14-00-rc1 -> v6-14-00-rc1 * [new tag] v6-14-02 -> v6-14-02 * [new tag] v6-14-04 -> v6-14-04 * [new tag] v6-14-06 -> v6-14-06 * [new tag] v6-14-08 -> v6-14-08 * [new tag] v6-15-02 -> v6-15-02 * [new tag] v6-16-00 -> v6-16-00 * [new tag] v6-16-00-rc1 -> v6-16-00-rc1 [musinsky@strela root]$ [musinsky@strela root]$ git fetch upstream [musinsky@strela root]$ ls tutorials/tree/temperature_Prague.dat ls: cannot access 'tutorials/tree/temperature_Prague.dat': No such file or directory [musinsky@strela root]$ git branch * master [musinsky@strela root]$ git checkout master Already on 'master' Your branch is up to date with 'origin/master'. [musinsky@strela root]$ git merge upstream/master Updating 1915926942..95d76220cf Fast-forward .ci/copy_headers.sh | 24 + .ci/format_script.sh | 22 + .ci/tidy_script.sh | 34 + .github/CODEOWNERS | 18 +- .gitignore | 9 +- .mailmap | 146 + .travis.yml | 168 +- CMakeLists.txt | 220 +- README.md | 23 +- README/CREDITS | 28 +- [musinsky@strela root]$ ls tutorials/tree/temperature_Prague.dat tutorials/tree/temperature_Prague.dat [musinsky@strela root]$ git branch * master [musinsky@strela root]$ git fetch upstream [musinsky@strela root]$ git merge upstream/master Already up to date. [musinsky@strela root]$ git remote -v origin git@github.com:musinsky/root.git (fetch) origin git@github.com:musinsky/root.git (push) upstream https://github.com/root-project/root.git (fetch) upstream https://github.com/root-project/root.git (push) [musinsky@strela root]$ git push origin master Warning: Permanently added the RSA host key for IP address '140.82.118.3' to the list of known hosts. Enumerating objects: 35690, done. Counting objects: 100% (35690/35690), done. Delta compression using up to 4 threads Compressing objects: 100% (12129/12129), done. Writing objects: 100% (33770/33770), 28.07 MiB | 4.38 MiB/s, done. Total 33770 (delta 23493), reused 30968 (delta 21019) remote: Resolving deltas: 100% (23493/23493), completed with 1667 local objects. To github.com:musinsky/root.git 1915926942..95d76220cf master -> master [musinsky@strela root]$ git push origin master Everything up-to-date [musinsky@strela root]$ # dir resp. repo z hore uvedeneho prikladu [musinsky@strela root]$ git checkout<TAB> Display all 408 possibilities? (y or n) [musinsky@strela root]$ git checkout upstream/<TAB> upstream/master upstream/v5-34-00-patches upstream/v6-06-00-patches upstream/v6-08-00-patches upstream/v6-10-00-patches upstream/v6-12-00-patches upstream/v6-14-00-patches upstream/v6-16-00-patches [musinsky@strela root]$ git checkout upstream/^C # nove clonovanie do novej dir [musinsky@strela AAAAAAAAAAAAAAAAAAAAAAAa]$ git clone git@github.com:musinsky/root.git Cloning into 'root'... [musinsky@strela AAAAAAAAAAAAAAAAAAAAAAAa]$ cd root/ [musinsky@strela root]$ git checkout<TAB> Display all 389 possibilities? (y or n) [musinsky@strela root]$ git checkout upstr^C # no upstream branches [musinsky@strela root]$ git remote -v origin git@github.com:musinsky/root.git (fetch) origin git@github.com:musinsky/root.git (push)
git clone
2017-03-20 total size => $ du -hs dir_name total files => $ find dir_name -type f | wc -l $ git clone --depth 1 -b v5-34-00-patches http://root.cern.ch/git/root.git root_v5-34-00-patches => 280 MB, 11854 files $ git clone -b v5-34-00-patches http://root.cern.ch/git/root.git root_v5-34-00-patches_no_depth => 789 MB, 11855 files $ git clone --depth 1 http://root.cern.ch/git/root.git root_master => 534 MB, 17468 files $ git clone http://root.cern.ch/git/root.git root_master_no_depth => 964 MB, 17467 files
dalej
Summary:
git add -A # stages All git add . # stages new and modified, without deleted git add -u # stages modified and deleted, without new
git add . # add to index only files created/modified and not those deleted git add -u # add to index only files deleted/modified and not those created git add -A # do both operation at once, add to index all files "git add -A" is equivalent to "git add .; git add -u".
git status git add . git status git commit -m "find multiple hits per one channel" git commit -a -m "macros cleanup" git status git push git push origin master # git status
delete tags
musinsky@musinsky strela]$ git tag 2013-11-29 strela_2010-06-24 strela_2010-11-11 strela_2013-11-29 [musinsky@musinsky strela]$ git push --delete origin <Tabulator> 2013-11-29 HEAD ORIG_HEAD origin/HEAD strela_2010-06-24 strela_2013-11-29 FETCH_HEAD master origin/gh-pages origin/master strela_2010-11-11
[musinsky@musinsky strela]$ git push --delete origin strela_2010-06-24 To git@github.com:musinsky/strela.git - [deleted] strela_2010-06-24 [musinsky@musinsky strela]$ git tag 2013-11-29 strela_2010-06-24 strela_2010-11-11 strela_2013-11-29 [musinsky@musinsky strela]$ git tag -d strela_2010-06-24 Deleted tag 'strela_2010-06-24' (was a706583)
[musinsky@musinsky strela]$ git push --delete origin strela_2010-11-11 To git@github.com:musinsky/strela.git - [deleted] strela_2010-11-11 [musinsky@musinsky strela]$ git tag -d strela_2010-11-11 Deleted tag 'strela_2010-11-11' (was c34286b) [musinsky@musinsky strela]$ git push --delete origin strela_2013-11-29 To git@github.com:musinsky/strela.git - [deleted] strela_2013-11-29 [musinsky@musinsky strela]$ git tag -d strela_2013-11-29 Deleted tag 'strela_2013-11-29' (was 5a6955c) [musinsky@musinsky strela]$
add tags
git tag -a v1.4 -m 'my version 1.4' git push origin v1.4
git push origin --tags # This will transfer all of your tags to the remote server that are not already there