commit

Proper Commit Messages

我与影子孤独终老i 提交于 2019-12-21 04:41:16
问题 What are commit messages for? I've always been writing them as an explanation of what I did, but I've recently gotten into a discussion about it with a colleague who writes commit messages explaining why he did. Which one is right, or is there another answer entirely? NOTE: I have absolutely no idea if there is a "right" answer for this. As such, I've labeled it community wiki and will not accept an answer. Upvotes shall decide the winner :) 回答1: As a personal preference, I can tell what was

Rollback multiple commits (before Pushed to public) in Mercurial

时光毁灭记忆、已成空白 提交于 2019-12-21 03:23:07
问题 I am aware that rollbacks can remove commits from the latest changeset in a local repository. However, is it possible to remove all the latest commits since the previous push without having to re-clone the share repository? 回答1: You could make a new repo with hg clone: hg clone -r last_good_changeset localrepo newlocalrepo 回答2: You can use the hg strip command, part of the mq extension: hg strip REV This will remove that revision + all its descendants. Before you try this, make a copy/clone

How do I merge a single commit?

你说的曾经没有我的故事 提交于 2019-12-20 11:53:49
问题 Sometimes I'm working with several branches at once. Say I have branches called master, release-1.1, and experimental. I create a new file or make a change in experimental and I want that one single change to apply to the other branches. Can I do this in git? If I simply merge the commit into another branch, git automatically "fast-forwards" and includes any commits in between. But there must be some way to handle this use case. 回答1: What you want to do is called cherry picking. You can

How to disable pre-commit code analysis for Git-backed projects using IntelliJ IDEA

懵懂的女人 提交于 2019-12-20 11:04:26
问题 I have a project in IntelliJ IDEA, and I'm using Git/GitHub as source control. Each time I try to commit changes, IntelliJ IDEA runs a lengthy code analysis and searches for TODOs. When it finds "problems," it prompts me whether or not I want to review or commit. I don't want the pre-commit code analysis to run, and I don't want IntelliJ IDEA to ask me about the results. I can't seem to find any setting in the regular IntelliJ IDEA project/IDE settings to disable this. How can I disable this?

Is there a tool to watch a remote Git repository on Ubuntu and do popup notifications when commits are made?

怎甘沉沦 提交于 2019-12-20 09:39:52
问题 I would like to have popup notifications when people make commits to repositories that I am watching. Not hosted on any particular site like github or anything, so the ability to just add the repository URL to a list of watched repositories would be needed. And as the title says, this is for Ubuntu, but cross platform is welcome! 回答1: And thus, git-notify was born! This little bash script will watch your origin/master for updates every 60 seconds and uses notify-send to alert you of new

See “real” commit date in github (hour/day)

╄→尐↘猪︶ㄣ 提交于 2019-12-20 09:13:40
问题 Is there a way to see the date of a commit in github, with day/hour precision? Older commits appear in a "human readable" format, such as "2 years ago" instead of showing the actual date. If it's not possible to see the actual date on github, is there a easier workaround than git clone ? 回答1: Hover your mouse over the 2 years ago and you'll get the timestamp. 回答2: The real date does not appear for me upon hovering "2 years ago", despite the text being wrapped by a <time> element with an iso

Can't exclude user interface state from commit in xcode

∥☆過路亽.° 提交于 2019-12-20 08:39:57
问题 I can't exclude user interface state file from commit. Every time I'm trying to push to github it asks me to commit first and insert user interface state file into the changes (even if I didn't move the mouse or interface at all it still is shown to commit!). I tried different methods, described in other similar topics. For example, I tried to add all possible cases of user interface into the .gitignore in root, like this: *.xcuserstate project.xcworkspace xcuserdata UserInterfaceState

Git (GitHub) commit at past date

泪湿孤枕 提交于 2019-12-20 08:30:00
问题 I am working on a git project (hosted on GitHub) and using GitHub for Windows. Yesterday, I got a lot accomplished but GitHub for Windows bailed on me (says it cannot make a commit) and I was not able to commit. I do not want to lose my GitHub commit streak, so I was wondering if there was any way to commit in a past date and sync with my GitHub (if this is possible). Also: I have staged my commits in the git-bash but have not committed yet. 回答1: While the question "How do I make a Git commit

GitHub pull request showing commits that are already in target branch

独自空忆成欢 提交于 2019-12-20 07:58:39
问题 I'm trying to review a pull request on GitHub to a branch that isn't master. The target branch was behind master and the pull request showed commits from master, so I merged master and pushed it to GitHub, but the commits and diff for them still appear in the pull request after refreshing. I've doubled checked that the branch on GitHub has the commits from master. Why are they still appearing in the pull request? I've also checked out the pull request locally and it only shows the un-merged

git change all history for committers names and email for specific committer

牧云@^-^@ 提交于 2019-12-20 04:38:49
问题 How i cant change the name and email for all my commits history but for and specific commiter.. something like, foreach allcommits if committer_name = "Hugo Casa" change : committer_name committer_email author_name author_email and after do this, push and refresh the data of the history. please helppp i search and found this: git filter-branch --commit-filter ' if [ "$GIT_COMMITTER_NAME" = "production251" ]; then GIT_COMMITTER_NAME="Hugo Casanova"; GIT_AUTHOR_NAME="Hugo Casanova"; GIT