tagged [git]
Git on custom SSH port
Git on custom SSH port My VPS provider recommends that I leave my SSH port to the custom port number they assign it by default (not 22). The thing is, while I know I can provide the port number when c...
- Modified
- 19 Dec at 15:2
git submodule update failed with 'fatal: detected dubious ownership in repository at'
git submodule update failed with 'fatal: detected dubious ownership in repository at' I mounted a new hdd in my linux workstation. It looks working well. I want to download some repo in the new disk. ...
- Modified
- 17 Dec at 05:38
Error "'git' is not recognized as an internal or external command"
Error "'git' is not recognized as an internal or external command" I have an installation of Git for Windows, but when I try to use the `git` command in Command Prompt, I get the following error: How ...
- Modified
- 17 Dec at 02:7
Visual Studio Code cannot detect installed Git
Visual Studio Code cannot detect installed Git Visual Studio Code reports "It look like git is not installed on your system." when I try to switch to the git view. I know I have git installed and used...
- Modified
- 17 Dec at 01:55
How can I remove a commit on GitHub?
How can I remove a commit on GitHub? I "accidentally" pushed a commit to GitHub. Is it possible to remove this commit? I want to revert my GitHub repository as it was before this commit.
- Modified
- 16 Dec at 16:19
How can I get a list of Git branches, ordered by most recent commit?
How can I get a list of Git branches, ordered by most recent commit? I want to get a list of all the branches in a Git repository with the "freshest" branches at the top, where the "freshest" branch i...
- Modified
- 10 Dec at 19:42
How do I undo the most recent local commits in Git?
How do I undo the most recent local commits in Git? I accidentally committed the wrong files to [Git](https://en.wikipedia.org/wiki/Git), but didn't push the commit to the server yet. > How do I undo ...
- Modified
- 23 Nov at 12:53
How to fast-forward a branch to head
How to fast-forward a branch to head I switched to after developing on a branch for a long time. The log shows: > Your branch is behind 'origin/master' by 167 commits, and can be fast-forwarded. I tri...
- Modified
- 12 Nov at 04:15
What is Git fast-forwarding?
What is Git fast-forwarding? Is it OK to assume that fast-forward means all commits are replayed on the target branch and the `HEAD` is set to the last commit on that branch?
- Modified
- 9 Nov at 21:7
How to rename a directory/folder on GitHub website?
How to rename a directory/folder on GitHub website? I was able to find a way on GitHub Website to [rename](https://github.com/blog/1436-moving-and-renaming-files-on-github) a single file and did so wi...
How to link to a specific line number on GitHub
How to link to a specific line number on GitHub I know I can link to a specific line number on a file on a GitHub repository (I'm sure I've seen this before)... How can I do this?
How to merge specific files from Git branches
How to merge specific files from Git branches I have 2 git branches: 1. branch1 2. branch2 I want to merge `file.py` into `file.py` in and only that file. In essence I just want to work on the `file.p...
How do I force Git to use LF instead of CR+LF under Windows?
How do I force Git to use LF instead of CR+LF under Windows? I want to force Git to check out files under Windows using just `LF` not `CR+LF`. I checked the two configuration options, but was not able...
- Modified
- 26 Oct at 11:44
Remove sensitive files and their commits from Git history
Remove sensitive files and their commits from Git history I would like to put a Git project on GitHub but it contains certain files with sensitive data (usernames and passwords, like /config/deploy.rb...
- Modified
- 23 Oct at 17:26
Git replacing LF with CRLF
Git replacing LF with CRLF On a Windows machine, I added some files using `git add`. I got warnings saying: > LF will be replaced by CRLF What are the ramifications of this conversion?
- Modified
- 16 Oct at 16:4
Why is it not a commit and a branch cannot be created from it?
Why is it not a commit and a branch cannot be created from it? I need to work with an intricate configuration of repositories. I have 5 of them: 1. A remote central repository on machine 1. 2. My loca...
- Modified
- 16 Oct at 11:52
Visual Studio Code - remove branches deleted on GitHub that still show in VS Code?
Visual Studio Code - remove branches deleted on GitHub that still show in VS Code? In VSCode, after I do a pull request and delete the branch on GitHub, that branch still shows up in Visual Studio Cod...
- Modified
- 16 Oct at 03:32
Why there are two ways to unstage a file in Git?
Why there are two ways to unstage a file in Git? Sometimes git suggests `git rm --cached` to unstage a file, sometimes `git reset HEAD file`. When should I use which? ``` D:\code\gt2>git init Initiali...
Make 'git diff' ignore ^M
Make 'git diff' ignore ^M In a project where some of the files contain `^M` as newline separators, diffing these files is apparently impossible, since `git diff` sees the entire file as just a single ...
- Modified
- 14 Oct at 14:25
Remove last commit from remote Git repository
Remove last commit from remote Git repository How can I remove the last commit from a remote GIT repository such as I don't see it any more in the log? If for example `git log` gives me the following ...
- Modified
- 27 Sep at 11:53
How can I deal with this Git warning? "Pulling without specifying how to reconcile divergent branches is discouraged"
How can I deal with this Git warning? "Pulling without specifying how to reconcile divergent branches is discouraged" After a `git pull origin master`, I get the following message: ``` warning: Pullin...
- Modified
- 22 Sep at 18:10
Github - unexpected disconnect while reading sideband packet
Github - unexpected disconnect while reading sideband packet I've got quite interesting problem. I tried to send some projects via bash to repo and recently there was a problem with sending it. ``` En...
Git is not working after macOS Update (xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools)
Git is not working after macOS Update (xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools) I updated to the latest OS, and/or restarted my computer (this happens on every...
- Modified
- 13 Sep at 14:7
How do I clone all remote branches?
How do I clone all remote branches? My `master` and `development` branches are tracked remotely on [GitHub](http://en.wikipedia.org/wiki/GitHub). How do I clone both these branches?
- Modified
- 9 Sep at 09:30
How do I remove a directory from a Git repository?
How do I remove a directory from a Git repository? How can I delete a single directory containing files from a Git repository?
- Modified
- 6 Sep at 16:58