随笔分类 -  Git

摘要:Git 默认不会跟踪空目录,执行 git status 时可能看不到它们。 假如你现在的目录都为空 frontend-engineering-system/ ├── apps/ ├── packages/ ├── docs/ └── README.md 可以先验证一下: git status 如果 阅读全文
posted @ 2026-09-28 15:07 Zhentiw 阅读(8) 评论(0) 推荐(0)
摘要:By default, git ignorecase for filename. It might happen that you change the filename from Modal.vueto modal.vue, then commit to git, in remote repo, 阅读全文
posted @ 2025-05-06 14:10 Zhentiw 阅读(32) 评论(0) 推荐(0)
摘要:Empty commits might seem unusual, but they offer significant advantages in managing version control. By documenting milestones, triggering automation 阅读全文
posted @ 2023-07-16 01:32 Zhentiw 阅读(79) 评论(0) 推荐(0)
摘要:docker exec container-id sh -c "patch -p1 < your-file.diff" Replace container-id with the ID of the container you want to run the command in, and your 阅读全文
posted @ 2023-05-10 22:53 Zhentiw 阅读(51) 评论(0) 推荐(0)
摘要:name: Development pipeline on: pull_request: branches: - main jobs: Server: runs-on: ubuntu-22.04 steps: - name: Check files uses: actions/checkout@v3 阅读全文
posted @ 2023-02-05 00:42 Zhentiw 阅读(57) 评论(0) 推荐(0)
摘要:Sometimes we when switch branch, might bring some modified files into the new branch to cleanup those files git clean -df https://git-scm.com/docs/git 阅读全文
posted @ 2023-01-25 04:36 Zhentiw 阅读(62) 评论(0) 推荐(0)
摘要:git checkout yourBranch git reset --soft HEAD~$(git rev-list --count HEAD ^master) git add -A git commit -m "one commit on yourBranch" 阅读全文
posted @ 2021-10-01 16:45 Zhentiw 阅读(259) 评论(0) 推荐(0)
摘要:In project, we can have three branches such as dev stage master Every developer can merge their code into 'dev' branch. 'stage' & 'master' will be loc 阅读全文
posted @ 2021-03-20 17:36 Zhentiw 阅读(66) 评论(0) 推荐(0)
摘要:1. Download the git repo into local. 2. Copy the SSH / HTTPS URL from CodeCommit Repo Then run: git remote set-url origin ssh://code-commit.address.xx 阅读全文
posted @ 2021-02-17 21:24 Zhentiw 阅读(82) 评论(0) 推荐(0)
摘要:You can do git log first to check which commit message you want to revert to. For example 'xxxxx123' is the commit id we want to revert to. Then do: g 阅读全文
posted @ 2020-12-08 15:19 Zhentiw 阅读(270) 评论(0) 推荐(0)
摘要:Create a .github directory at the root of your project Add a file called pull_request_template.md . Here's an example: This PR... ## Changes - ## Scre 阅读全文
posted @ 2020-03-02 14:20 Zhentiw 阅读(696) 评论(0) 推荐(0)
摘要:Create a .github directory at the root of your project Create an ISSUE_TEMPLATE directory inside the .github directory Add a file called bug_report.md 阅读全文
posted @ 2020-03-02 14:18 Zhentiw 阅读(412) 评论(0) 推荐(0)
只有注册用户登录后才能阅读该文。
posted @ 2020-01-15 04:18 Zhentiw 阅读(1) 评论(0) 推荐(0)
摘要:We make a .env file and accidentally push it to github. In order to remove the .env file, we first have to add it to our .gitignore file - but that's 阅读全文
posted @ 2020-01-13 15:57 Zhentiw 阅读(173) 评论(0) 推荐(0)
摘要:We've made a pull request and now we can clean up the branches by deleting the feature branch. Branches are just pointers to commits - so we can safel 阅读全文
posted @ 2020-01-13 15:53 Zhentiw 阅读(170) 评论(0) 推荐(0)
摘要:Once a commit is pushed, you do NOT want to use git reset to undo it - because reset will rewrite the history tree, and anyone who has already pulled 阅读全文
posted @ 2020-01-09 15:01 Zhentiw 阅读(183) 评论(0) 推荐(0)
摘要:If you've removed a commit with git reset --hard, it's still possible to recover the commit using git reflog to look up the commit hash. Once we find 阅读全文
posted @ 2020-01-08 20:35 Zhentiw 阅读(149) 评论(0) 推荐(0)
摘要:git reset has three primary options that we might use: --soft, --hard and --mixed (the default). We'll use git reset to undo the latest commit in all 阅读全文
posted @ 2020-01-08 20:29 Zhentiw 阅读(143) 评论(0) 推荐(0)
摘要:If you've added files to the staging area (the Index) accidentally - you can remove them using git reset. We'll first add a file to staging, but then 阅读全文
posted @ 2019-12-12 16:57 Zhentiw 阅读(171) 评论(0) 推荐(0)
摘要:Change a Commit Message that Hasn't Been Pushed Yet If you make a mistake in a commit message but HAVEN'T pushed it yet, you can change that commit me 阅读全文
posted @ 2019-12-12 16:41 Zhentiw 阅读(199) 评论(0) 推荐(0)