revision-history

How do I clone, fetch or sparse checkout a single directory or a list of directories from git repository?

流过昼夜 提交于 2020-02-15 06:42:04
问题 How do I clone, fetch or sparse checkout a single file or directory or a list of files or directories from a git repository avoiding downloading the entire history or at least keeping history download at minimum? For the benefit of people landing here, these are references to other similar questions: How do I clone a subdirectory only of a Git repository? How to sparsely checkout only one single file from a git repository? These similar questions were asked some 10 years ago and git evolved

Visual studio code: automatic commit git

无人久伴 提交于 2020-02-01 08:19:52
问题 Many times, I forget to commit my edits to my git. And if I closed VSCode, I can't use ctrl-Z anymore. Because, I have git set up, I thought I could use something like an automatic commit every 30sec or so. I have seen this extension btu ti's not open source, so I don't want to use it. I also found this but my programming skills aren't good enough to implement it. I also wonder if using git in this way is a good option, as the git folder may get really heavy quickly (my git is only local, so

With Mercurial, how do you hg log a branch with cross-branch ancestors?

余生颓废 提交于 2020-01-13 18:25:11
问题 In Mercurial, I'm wanting to build a changelog of all commit messages for revisions my stable branch. Currently, I'm using: hg log -r <oldid>::<newid> where is the revision id of the changeset from the last time we pushed out code, and is stable 's tip. This works great for code changes that are only on the stable branch, but if I'm merging another branch (such as a new major version which had its own development branch), all those commit messages are omitted! Instead I only get the 1 commit

Does Github have a view that shows diffs between file versions?

…衆ロ難τιáo~ 提交于 2019-12-30 15:43:27
问题 I'm looking for a view that highlights changes to files, similar to the changes you can see viewing the Edits button for an SO item, or the history of a wiki page. 回答1: For example https://github.com/clojure/clojure/commit/c89bf2e9bcfc1bca62e36dee2d78a48f8c38c15c You are looking for 'diffs' aka 'changesets'. 回答2: Note: the change set view not only offer a diff (line by line or side-by-side), it now (Sept. 4th 2014) offer a word-by-word diff . See: "Better Word Highlighting in Diffs" Commits,

Does Github have a view that shows diffs between file versions?

白昼怎懂夜的黑 提交于 2019-12-30 15:43:11
问题 I'm looking for a view that highlights changes to files, similar to the changes you can see viewing the Edits button for an SO item, or the history of a wiki page. 回答1: For example https://github.com/clojure/clojure/commit/c89bf2e9bcfc1bca62e36dee2d78a48f8c38c15c You are looking for 'diffs' aka 'changesets'. 回答2: Note: the change set view not only offer a diff (line by line or side-by-side), it now (Sept. 4th 2014) offer a word-by-word diff . See: "Better Word Highlighting in Diffs" Commits,

See history in GitHub after folder rename

泄露秘密 提交于 2019-12-29 06:35:24
问题 After renaming a folder ( git mv foldername newfoldername ) the history of this folder in Github has gone. I can still view the full history of any file in the folder if I clone the repro and run... git log --follow ./newfoldername/file But is it possible to get history for renamed folders visible in Github? This is a Github question, the git revision history is working as expected. Thanks 回答1: I wrote a chrome extension to enable this. Source on github. 回答2: You just need a commit before the

git: list remote changes

时间秒杀一切 提交于 2019-12-25 01:47:23
问题 I have a git remote "mine" (happens to be a github fork) that has managed to get ahead by 2 commits. My local master branch is ahead of it by 244 commits (pulled from the original gitub repo). As a result, pushing to "mine" is not fast-forward. How can I list the 2 commits by which "mine" is ahead? 回答1: Your question is a little unclear, but it sounds like you want to list the commits on the remote branch that don't exist in your local branch yet. This is simply accomplished using a commit

Process 'command 'git' finished with non-zero exit value 1

隐身守侯 提交于 2019-12-24 13:13:54
问题 I want to implement an update revision number automatically in the manifest file. Here is my code: def getGitRevision(){ new ByteArrayOutputStream().withStream { os -> exec { commandLine 'git', 'rev-list', 'HEAD', '--count' args = ['info'] standardOutput = os } def outputAsString = os.toString() def matchLastChangedRev = outputAsString =~ /Last Changed Rev: (\d+)/ ext.gitRev = "${matchLastChangedRev[0][1]}".toInteger() } return String.valueOf(gitRev); } But it throws the following error:

git p4: migrate full history - including integration history

对着背影说爱祢 提交于 2019-12-22 13:57:12
问题 A couple of years ago, a subfolder in one of my Perforce depots (e.g. //FirstDepot/LargeSubfolder/... ) became too large to maintain, so I 'migrated' it into a depot of its own (e.g. //NewDepotFromLargeSubfolder/... ). Perforce does not support integrations from one depot to another, so I basically checked out the files, added them to the new depot and deleted them from the subfolder. Now I am about to migrate the entire Perforce server to a number of git repositories. The git p4 procedure

Patch not applied after it gets merged

寵の児 提交于 2019-12-22 08:17:09
问题 Using the git flow tool, I created a feature branch (branched off dev ), made a bunch of changes, and merged the branch back onto dev . There is a file which I have modified in the feature branch. I can confirm that the revision (let's call it REV-A ) that modifies the file ( FILE-A ) is present and applied in the feature branch. However, after the merge, FILE-A is in its original (pre-merge) state on the dev branch. I can see REV-A when I do git log on dev , and if I follow the lines