github-for-windows

Ignore configs with git

拥有回忆 提交于 2019-12-01 13:12:17
In my project I have config files that have private information. I committed some example templates to Github, but I have the actual configs in my working copy so I can build from it and I don't want them available to commit. I tried using .gitignore, but the templates are already tracked. I tried git rm filename but that tries to delete the templates. I tried git update-index --assume-unchanged filename and git update-index --skip-worktree filename but they still show up as "modified" when using git status (and under Files to Commit in Github for Windows). Is there any way to ignore changes

Github for windows just deleted all my files

别来无恙 提交于 2019-12-01 12:23:29
I just tried to do the dutiful thing and backup my work to github, since I had not done a commit in a few weeks due to working on a large work area. Github for windows notified me it needed to download the latest update and it did so. I opened the repo, then did a commit. When I hit sync, it deleted all 138 new files from disk and reset to the last commit more than a month ago. It also overwrote all existing files that were modified with the old version. I have no backup... this was meant to be the fscking backup. Is there some magic git command to undo this shitstorm, or will I need to try

change the branch when the branch not shown in git branch -l

谁说胖子不能爱 提交于 2019-12-01 11:43:13
When I cloned a remote repository, I used the following command- git clone -b mybranch --single-branch git://sub.domain.com/repo.git After that, when I did a git branch -l it just showed me the branch I cloned. Now, I want a pull of another branch, but it is not showing me other branches. What should I do? You can list the branches directly on the remote with git ls-remote command: git ls-remote git://sub.domain.com/repo.git Then use git fetch command to fetch a specific branch and git checkout command to switch to the branch. git branch -l shows you local branches. You want remote branches,

Github for windows just deleted all my files

感情迁移 提交于 2019-12-01 11:24:44
问题 I just tried to do the dutiful thing and backup my work to github, since I had not done a commit in a few weeks due to working on a large work area. Github for windows notified me it needed to download the latest update and it did so. I opened the repo, then did a commit. When I hit sync, it deleted all 138 new files from disk and reset to the last commit more than a month ago. It also overwrote all existing files that were modified with the old version. I have no backup... this was meant to

change the branch when the branch not shown in git branch -l

ぃ、小莉子 提交于 2019-12-01 11:22:58
问题 When I cloned a remote repository, I used the following command- git clone -b mybranch --single-branch git://sub.domain.com/repo.git After that, when I did a git branch -l it just showed me the branch I cloned. Now, I want a pull of another branch, but it is not showing me other branches. What should I do? 回答1: You can list the branches directly on the remote with git ls-remote command: git ls-remote git://sub.domain.com/repo.git Then use git fetch command to fetch a specific branch and git

Ignore configs with git

允我心安 提交于 2019-12-01 11:20:03
问题 In my project I have config files that have private information. I committed some example templates to Github, but I have the actual configs in my working copy so I can build from it and I don't want them available to commit. I tried using .gitignore, but the templates are already tracked. I tried git rm filename but that tries to delete the templates. I tried git update-index --assume-unchanged filename and git update-index --skip-worktree filename but they still show up as "modified" when

Getting errors when using GitHub for Windows

我与影子孤独终老i 提交于 2019-12-01 03:39:54
I suddenly got errors when I was using git last week, for no apparent reason. I only have access to a windows PC. The errors I'm getting doesn't seem to give me any clear answers as to what went wrong, how, and what I need to do to fix it. The error happened right after I cloned an empty repository, and I've been uninstalling and reinstalling GitHub for Windows ever since, I usually only use the Git Shell that comes installed with, but the GUI is also having problems doing anything beyond starting up. The error in it's entirety: WARNING: posh-git requires Git 1.7.2 or better. You have . Couldn

Pulling down latest code from github to Android Studio

冷暖自知 提交于 2019-11-30 17:53:45
How to sync my local Android Studio project with the latest code on github ? I want to download all the latest changes but I don't want my local changes overwritten . If there is a conflict, it should ask me to resolve those particular files. Is there a way to achieve this? "I want to download all the latest changes but I don't want my local changes overwritten" You probably want to 'fetch' the upstream before merging your changes then. VCS -> Git -> Fetch, this will update all your branches, so you can check them and later use VCS -> Git -> Merge Changes to update your local code. That's what

Installing GitHub for Windows

随声附和 提交于 2019-11-30 11:42:44
问题 I'm trying to install GitHub for Windows. I tried installing it the normal way and got this error: Application installation did not succeed. Cannot locate application files on the server. Contact the application vendor or your administrator for assistance. Clicking on Details... gave me this: PLATFORM VERSION INFO Windows : 6.1.7601.65536 (Win32NT) Common Language Runtime : 4.0.30319.18034 System.Deployment.dll : 4.0.30319.17929 built by: FX45RTMREL clr.dll : 4.0.30319.18034 built by:

Change Git repository directory location.

青春壹個敷衍的年華 提交于 2019-11-30 05:50:44
问题 With Git/Github for Windows, if I have a repository with this directory: C:\dir1\dir2 , what do I need to do to move the repo files to C:\dir1 ? I can obviously physically copy and paste the files, but what do I need to do on the Git side? I have this repo on GitHub and I use Git Bash and GitHub for Windows. 回答1: Simply copy the entire working directory contents (including the hidden .git directory). This will move the entire working directory to the new directory and will not affect the