git

Visual Studio Extensibility: Get the Git repository's path from Team Explorer's Git Commit Details page

给你一囗甜甜゛ 提交于 2021-02-07 19:29:24
问题 I am adding Git integration to my Visual Studio extension Diff All Files, which allows for quickly diffing (i.e. comparing) all files in the Team Explorer window with a previous version. I have it working with the Git Changes page (in Team Explorer), since when I get the Microsoft.TeamFoundation.Git.Controls.Extensibility.IChangesExt service the files in it's IncludedChanges property contain the full file path on disk. However, when working with the Git Commit Details page I get the Microsoft

After a git reset, unreachable commit not removed

╄→尐↘猪︶ㄣ 提交于 2021-02-07 19:17:54
问题 I have a small repo that has a couple of commits: * a0fc4f8 (HEAD -> testbranch) added file.txt * e6e6a8b (master) hello world now * f308f53 Made it echo * f705657 Added hello * 08a2de3 (tag: initial) initial Also: $ git status On branch testbranch nothing to commit, working directory clean I can not understand the following behavior. On this state I run: $ git reset initial I see now: * e6e6a8b (master) hello world now * f308f53 Made it echo * f705657 Added hello * 08a2de3 (HEAD ->

Git convert between tabs and spaces but only sometimes

蹲街弑〆低调 提交于 2021-02-07 18:27:44
问题 First, I'm a newbie to git. Like, I could barely tell a cache from an index if it hit me in the staging area. Or something like that. With that out of the way, my problem is this: Suppose I want to work on a project whose coding style mandates spaces for indentation, but I like tabs. It seems that I can use the clean and smudge features, but there's a catch. The coding style is not followed consistently, and there some files that mix tabs and spaces on the same line. Thus a naïve approach

How to do alignment in git logs with graph

二次信任 提交于 2021-02-07 18:23:10
问题 With something like git log --abbrev-commit --pretty=format:'%h %<(72,trunc)%s %d' , you can get a fairly well aligned git commit message with a graph. It is completely aligned if you drop the --graph option. Here is roughly what the command looks like * 40f1481 Commit title message (HEAD, dev) |\ | * 9b5122d Commit title message (debug) | * fe7ddfe Commit title message | * 8e4d414 Commit title message | * 53affdd Commit title message | * a45fbaf Commit title message |/ * 36b23c3 Commit title

How to do alignment in git logs with graph

百般思念 提交于 2021-02-07 18:21:43
问题 With something like git log --abbrev-commit --pretty=format:'%h %<(72,trunc)%s %d' , you can get a fairly well aligned git commit message with a graph. It is completely aligned if you drop the --graph option. Here is roughly what the command looks like * 40f1481 Commit title message (HEAD, dev) |\ | * 9b5122d Commit title message (debug) | * fe7ddfe Commit title message | * 8e4d414 Commit title message | * 53affdd Commit title message | * a45fbaf Commit title message |/ * 36b23c3 Commit title

Git remote push: failed to load advapi32.dll

可紊 提交于 2021-02-07 18:21:03
问题 I am new to Git and Github; and I came across a problem. There is a similiar question here (git bash failed to load advapi32.dll), but they are experiencing a different problem and there are no answers either. I have searched online and was unable to fix this. Here is the issue: I am using Git Bash to push/pull commits to Github. When I try to push my work, I get this error saying "failed to load advapi32.dll ". I do have this file in my registry. The full Git message is bellow. It is worth

Git remote push: failed to load advapi32.dll

冷暖自知 提交于 2021-02-07 18:20:24
问题 I am new to Git and Github; and I came across a problem. There is a similiar question here (git bash failed to load advapi32.dll), but they are experiencing a different problem and there are no answers either. I have searched online and was unable to fix this. Here is the issue: I am using Git Bash to push/pull commits to Github. When I try to push my work, I get this error saying "failed to load advapi32.dll ". I do have this file in my registry. The full Git message is bellow. It is worth

sourcetree line ending issue

感情迁移 提交于 2021-02-07 18:19:11
问题 I am getting a very strange whitespace issue. I am working with a local copy of a WordPress site with the .git repo in the wp-content/themes folder so all changes to any theme are tracked etc. When I set up the repo it considered every file (apart from those in gitignore) as new files and I committed those as the 'initial commit'. Firstly is that normal? To have to commit all the files when setting up a new repo? 2nd - and this is the strange behaviour. when I go to stage these files I get

Clone git repo hosted on a Windows shared folder from Mac OS X

烂漫一生 提交于 2021-02-07 17:31:20
问题 I host a git remote repo on a Windows shared folder. I clone it using: git clone //git-host-pc/SharedFolder/MyProject/ This command works from a Windows PC, but on a Mac, I get this error: fatal: repository '//git-host-pc/SharedFolder/MyProject' does not exist Trying git clone smb://git-host-pc/SharedFolder/MyProject gives me this error - fatal: Unable to find remote helper for 'smb' . Note: I've found this question has been asked before mine - Use a git repos on a windows share from osx,

Clone git repo hosted on a Windows shared folder from Mac OS X

安稳与你 提交于 2021-02-07 17:29:32
问题 I host a git remote repo on a Windows shared folder. I clone it using: git clone //git-host-pc/SharedFolder/MyProject/ This command works from a Windows PC, but on a Mac, I get this error: fatal: repository '//git-host-pc/SharedFolder/MyProject' does not exist Trying git clone smb://git-host-pc/SharedFolder/MyProject gives me this error - fatal: Unable to find remote helper for 'smb' . Note: I've found this question has been asked before mine - Use a git repos on a windows share from osx,