<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>version-control on IT Quicktasks</title><link>https://quicktasks.ismael.casimpan.com/tags/version-control/</link><description>Recent content in version-control on IT Quicktasks</description><generator>Hugo -- gohugo.io</generator><copyright>Copyright © 2018–2022, Ismael Casimpan Jr.; All Rights Reserved</copyright><lastBuildDate>Fri, 01 Apr 2022 06:03:11 +0800</lastBuildDate><atom:link href="https://quicktasks.ismael.casimpan.com/tags/version-control/index.xml" rel="self" type="application/rss+xml"/><item><title>Git Rebase</title><link>https://quicktasks.ismael.casimpan.com/post/git-rebase/</link><pubDate>Fri, 01 Apr 2022 06:03:11 +0800</pubDate><guid>https://quicktasks.ismael.casimpan.com/post/git-rebase/</guid><description>
Rebase is used in merging two or more commits into one. Per experience, you can only rebase to an older commit.
Say, in these commits
1~$ git log -2 --pretty=oneline 2a0dd6b55000399c5f8b5f0f55286e167725e51c2 (HEAD -&amp;gt; v0.2.x_wip, origin/v0.2.x_wip) docktie_cli getx: Tested working implementation for #17. 3fb8f1de0cf1af7b447dfc9275878c516384f3a0d docktie_cli getx: initial implementation wip for #17 Older one is fb8f1de0cf1af7b447dfc9275878c516384f3a0d
Run:
1~$ git rebase --interactive HEAD~2 You'll be in an interactive mode (in an editor)
1pick fb8f1de docktie_cli getx: Implementation for #17.</description></item><item><title>Git with Latest Commit Log Only</title><link>https://quicktasks.ismael.casimpan.com/post/git-with-latest-commit-log-only/</link><pubDate>Tue, 26 May 2020 23:17:11 +0800</pubDate><guid>https://quicktasks.ismael.casimpan.com/post/git-with-latest-commit-log-only/</guid><description>
In some situations, you only need the latest commit log, saving space in the process. You have to do it as follows:
1git clone --depth=1 REPO</description></item><item><title>Cloning Repos with Submodules</title><link>https://quicktasks.ismael.casimpan.com/post/cloning-repo-with-submodules/</link><pubDate>Wed, 26 Feb 2020 23:17:11 +0800</pubDate><guid>https://quicktasks.ismael.casimpan.com/post/cloning-repo-with-submodules/</guid><description>
Submodules is quite a pain to manage. To make it easy, just use this command:
1git clone --recursive &amp;lt;repo_full_path&amp;gt; Failure to use --recursive would mean using a lot of commands later.
See detailed git submodules commands in https://www.vogella.com/tutorials/GitSubmodules/article.html</description></item><item><title>Checking Modified Files in a Commit</title><link>https://quicktasks.ismael.casimpan.com/post/check-modified-files/</link><pubDate>Wed, 19 Feb 2020 23:17:11 +0800</pubDate><guid>https://quicktasks.ismael.casimpan.com/post/check-modified-files/</guid><description>
Get the commit-hash (e.g. of last commit)
1git log -1 Show the files changed only in commit
1git show --stat &amp;lt;commit-hash&amp;gt; See details in https://stackoverflow.com/questions/424071/how-to-list-all-the-files-in-a-commit</description></item><item><title>Merge Remote Branch to Local</title><link>https://quicktasks.ismael.casimpan.com/post/merge-remote-branch-to-local/</link><pubDate>Mon, 08 Apr 2019 23:17:11 +0800</pubDate><guid>https://quicktasks.ismael.casimpan.com/post/merge-remote-branch-to-local/</guid><description>
If you need to merge a remote repo's (e.g. acquia) branch to your local branch:
1git pull acquia master</description></item><item><title>Checking Remote Tags</title><link>https://quicktasks.ismael.casimpan.com/post/checking-remote-tags/</link><pubDate>Sun, 08 Apr 2018 23:17:11 +0800</pubDate><guid>https://quicktasks.ismael.casimpan.com/post/checking-remote-tags/</guid><description>
1git ls-remote --tags</description></item><item><title>Configure email and username</title><link>https://quicktasks.ismael.casimpan.com/post/configure-email-username/</link><pubDate>Sun, 08 Apr 2018 23:17:11 +0800</pubDate><guid>https://quicktasks.ismael.casimpan.com/post/configure-email-username/</guid><description>
1git config user.name &amp;#34;Your Name Here&amp;#34; 2git config user.email &amp;#34;name@email.com&amp;#34;</description></item><item><title>Fix the identity used for a commit</title><link>https://quicktasks.ismael.casimpan.com/post/fix-identity-used-in-commit/</link><pubDate>Sun, 08 Apr 2018 23:17:11 +0800</pubDate><guid>https://quicktasks.ismael.casimpan.com/post/fix-identity-used-in-commit/</guid><description>
1git commit --amend --reset-author</description></item><item><title>Ignore Permission Changes</title><link>https://quicktasks.ismael.casimpan.com/post/ignore-permission-changes/</link><pubDate>Sun, 08 Apr 2018 23:17:11 +0800</pubDate><guid>https://quicktasks.ismael.casimpan.com/post/ignore-permission-changes/</guid><description>
1git config core.fileMode false details in https://stackoverflow.com/questions/1580596/how-do-i-make-git-ignore-file-mode-chmod-changes</description></item><item><title>Pathspec error on tag checkout</title><link>https://quicktasks.ismael.casimpan.com/post/pathspec-error-pn-tag-checkout/</link><pubDate>Sun, 08 Apr 2018 23:17:11 +0800</pubDate><guid>https://quicktasks.ismael.casimpan.com/post/pathspec-error-pn-tag-checkout/</guid><description>
When you see error such as this
1bash-4.1$ git checkout Brick_Release_2018-06-19 2error: pathspec &amp;#39;Brick_Release_2018-06-19&amp;#39; did not match any file(s) known to git. 'git fetch' first and retry to checkout. If it still fails, ensure you're using the correct branch name.</description></item><item><title>Pull but no push in git</title><link>https://quicktasks.ismael.casimpan.com/post/pull-but-no-push/</link><pubDate>Sun, 08 Apr 2018 23:17:11 +0800</pubDate><guid>https://quicktasks.ismael.casimpan.com/post/pull-but-no-push/</guid><description>
1$ git remote set-url --push origin no-pushing 2$ git push 3fatal: &amp;#39;no-pushing&amp;#39; does not appear to be a git repository 4fatal: The remote end hung up unexpectedly See https://stackoverflow.com/questions/7556155/git-set-up-a-fetch-only-remote</description></item><item><title>Reverting a commit</title><link>https://quicktasks.ismael.casimpan.com/post/reverting-a-commit/</link><pubDate>Sun, 08 Apr 2018 23:17:11 +0800</pubDate><guid>https://quicktasks.ismael.casimpan.com/post/reverting-a-commit/</guid><description>
Scenario: A PR has been merged and further tests found out that it breaks the build. What do you do?
1git checkout -b to-revert-commits 2git revert &amp;lt;sha-to-remove&amp;gt; 3git push -u origin to-revert-commits 45## create a Pull Request and have it reviewed and merged by others.</description></item><item><title>Undo almost anything in git</title><link>https://quicktasks.ismael.casimpan.com/post/undo-almost-anything-in-git/</link><pubDate>Sun, 08 Apr 2018 23:17:11 +0800</pubDate><guid>https://quicktasks.ismael.casimpan.com/post/undo-almost-anything-in-git/</guid><description>
See https://github.com/blog/2019-how-to-undo-almost-anything-with-git</description></item></channel></rss>