我每小时做的每一件事我都会全力以赴。这很好,但是我最终提交了太多的东西。
我希望能够清除它,而不是:
1 hour ago
2 hours ago
.
23 hours ago
24 hours ago
我只有一些类似的东西:
1 hour ago
2 hours ago
1 day ago
7 days ago
等。
目前我每小时做一次:
git-add .
git-commit -a
如何删除某些提交?我不想撤消任何更改。我只是不想有太多的观点需要回复。我希望在过去的几个小时内有很多提交,但之后只有几个(过去的一天、一周、一个月等或其他我有意保留的要点)。
我正在尝试发送一份报告,其中包含了开发人员每天在git存储库中完成的提交计数。
#read all the inputs
read -p "Enter the Branch Name:" branchname
read -p "Enter the from date:" frmdate
read -p "Enter the To date:" todate
#execute the command to get the commit history
git log origin/$branchname --name-status --pret
因此,我使用git远程从本地机器到github,当我第一次提交时,目录是web/main,然后我将它推入Github。之后,我改变了主意,将main文件夹移到一个名为backend的新文件夹中,目录更改为web/backend/main。请记住,我移动了 it,这样web/main就不应该再存在了,并且它不存在于我的本地机器中,但是在中,文件夹仍然存在。这是故意的吗?
git状况:
$ git status
On branch master
Your branch is up to date with 'origin/master'.
nothing to commit, w
我在windows上使用Github,我只有主程序,没有分支,最后一次提交无法同步。我原以为revert命令会撤销提交,但我错了,现在我在项目文件夹上使用了gitbash命令,结果是这样的
$ git status
On branch master
Your branch is ahead of 'origin/master' by 2 commits.
(use "git push" to publish your local commits)
nothing to commit, working directory clean
bash: command