About 391,000 results
Open links in new tab
  1. Can you get the number of lines of code from a GitHub repository?

    Nov 12, 2014 · The question “ Count number of lines in a git repository ” asks how to count the lines of code in a local Git repository, but: You have to clone the project, which could be …

  2. How do I change the URI (URL) for a remote Git repository?

    I had to do this on an old version of git (1.5.6.5) and the set-url option did not exist. Simply deleting the unwanted remote and adding a new one with the same name worked without …

  3. Moving Git repository content to another repository preserving …

    322 I am trying to move only the contents of one repository (repo1) to another existing repository (repo2) using the following commands: git clone repo1 git clone repo2 cd repo1 git remote rm …

  4. How do I clone a subdirectory only of a Git repository?

    What you are trying to do is called a sparse checkout, and that feature was added in Git 1.7.0 (Feb. 2012). The steps to do a sparse clone are as follows: mkdir <repo> cd <repo> git init git …

  5. git - Checkout to a specific folder - Stack Overflow

    Jun 12, 2024 · Same here git status shows a lot of mods, and git reset doesn't help. I had to git checkout -f HEAD to restore the state of my repo.

  6. How to determine the URL that a local Git repository was originally ...

    Oct 10, 2015 · 7979 To obtain only the remote URL: git config --get remote.origin.url If you require full output, and you are on a network that can reach the remote repo where the origin resides: …

  7. git - remote add origin vs remote set-url origin - Stack Overflow

    Below will reinitialize your local repo; also clearing remote repos (ie origin): git init Then below, will create 'origin' if it doesn't exist: git remote add origin [repo-url] Else, you can use the set-url …

  8. How to convert existing non-empty directory into a Git working ...

    Now use copied URL to link your local repo with the remote GitHub repo. When you clone a repository with git clone, it automatically creates a remote connection called origin pointing …

  9. Count number of lines in a git repository - Stack Overflow

    How would I count the total number of lines present in all the files in a git repository? git ls-files gives me a list of files tracked by git. I'm looking for a command to cat all those files.

  10. Push local Git repo to new remote including all branches and tags

    I have a local Git repo that I would like to push to a new remote repo (brand new repo set up on Beanstalk, if that matters). My local repo has a few branches and tags, and I would like to …