About 407,000 results
Open links in new tab
  1. Git for beginners: The definitive practical guide

    How do you create a new project/repository? A git repository is simply a directory containing a special .git directory. This is different from "centralised" version-control systems (like subversion), where a "repository" is hosted on a remote server, which you checkout into a "working copy" directory. With git, your working copy is the repository.

  2. Synchronizing a local Git repository with a remote one

    Feb 17, 2019 · git fetch origin && git reset --hard origin/master && git clean -f -d Or step-by-step: git fetch origin git reset --hard origin/master git clean -f -d Your local branch is now an exact copy (commits and all) of the remote branch. Command output: Here is an example of running the command on a local clone of the Forge a git repository.

  3. github - How can I use Git locally? - Stack Overflow

    Sep 5, 2015 · git add git commit -m "new commit" to save ("commit") your changes. Don't git push at all, and don't git pull — there's no remote to sync changes with (git push and git pull just push and pull changes from the remote/online repository). Type: git …

  4. How do I clear my local working directory in Git?

    Mar 23, 2009 · (use "git checkout -- <file>..." to discard changes in working directory) To reset the entire repository to the last committed state: git reset --hard To remove untracked files, I usually just delete all files in the working copy (but not the .git/ folder!), then do git reset --hard which leaves it with only committed files.

  5. How can I fully delete a Git repository created with init?

    To fully delete the .git repository in your computer (in Windows 8 and above): The .git repository is normally hidden in windows ; So you need to mark the "hidden items" to show the hidden folders ; At the top site of you directory you find "view" option ; Inside "view" option you …

  6. git - How to add a new project to Github using VS Code - Stack …

    Navigate to the local project directory and create a local git repository: git init. Once that is successful, click on the 'Source Control' icon on the left navbar in VS-Code.One should be able to see files ready to be commit-ed. Press on 'Commit' button, provide comments, stage the changes and commit the files. Alternatively you can run from CLI

  7. "fatal: Not a git repository (or any of the parent directories)" from ...

    2023 Update: git init will show a message that the current git repository as been 'reinitialized' but will NOT affect files (from the clone) or the remote settings. However it is irelevant as the actual OP issue is still that the user needs to cd into the directory to do this

  8. git clone ssh permission denied - Stack Overflow

    C:\Program Files\Git\etc\ssh-- open ssh-config file present under it and add below information : Host github.com User git IdentityFile << absolute path to your private key for git >> -- restart power shell and try to clone repository again. git clone <<url copied from git repo>>

  9. git - The way to "reinit" repository - Stack Overflow

    Jun 28, 2013 · git reset --soft HEAD^ git add -A . git commit -m "rewriting history" git push --force origin master This will back up to the previous commit (while preserving the working tree and index), commit your changes, and then force push that rewritten history to the remote. push --force is dangerous stuff. It will disturb others who have already ...

  10. Generating statistics from Git repository - Stack Overflow

    I'm doing a git repository statistics generator in ruby, it's called git_stats. You can find examples generated for some repositories on project page. Here is a list of what it can do: General statistics Total files (text and binary) Total lines (added and deleted) Total commits; Authors; Activity (total and per author) Commits by date; Commits ...

Refresh