Trending questions in Git & GitHub

+4 votes
4 answers

Git push vs git push origin

In simple words git push command updates ...READ MORE

Apr 23, 2019 in Git & GitHub by Hiran
137,523 views
+1 vote
2 answers

fatal: unable to access could not resolve host: GitHub

Hi@akhtar, This can be caused in incorrect proxy ...READ MORE

Apr 10, 2020 in Git & GitHub by MD
• 94,990 points
16,127 views
+2 votes
3 answers

! [rejected] master -> master (fetch first) error: failed to push some refs to 'git@github.com:abc70/new.git'

git push origin master --force I met the ...READ MORE

Apr 29, 2020 in Git & GitHub by anonymous
12,608 views
0 votes
1 answer

How to ignore an error on 'git pull' about my local changes would be overwritten by merge?

Hi Team, If you want to remove all ...READ MORE

Jan 5 in Git & GitHub by MD
• 94,990 points
92 views
0 votes
1 answer

Git: cannot checkout branch - error: pathspec '…' did not match any file(s) known to git.

Hi@MD, You can try the git fetch command ...READ MORE

Jan 4 in Git & GitHub by akhtar
• 38,120 points
111 views
0 votes
1 answer

How do I go to a particular version of a file in the Git repository?

Hi@akhtar, You can use git checkout <sha1> to check ...READ MORE

Jan 5 in Git & GitHub by MD
• 94,990 points
69 views
0 votes
1 answer

Please: Commit your changes or stash them before you can merge in Git.

Hi@akhtar, You can't merge with local modifications. Git ...READ MORE

Jan 4 in Git & GitHub by MD
• 94,990 points
98 views
0 votes
1 answer

How do I update the password for Git?

Hi@akhtar, You need to update your credentials. For ...READ MORE

Jan 5 in Git & GitHub by MD
• 94,990 points
34 views
0 votes
1 answer

Git pull a certain branch from GitHub.

Hi@akhtar, You can simply track your remote branches ...READ MORE

Jan 5 in Git & GitHub by MD
• 94,990 points
37 views
0 votes
1 answer

Remove credentials from Git.

Hi@akhtar, The Git credential cache runs a daemon ...READ MORE

Jan 4 in Git & GitHub by MD
• 94,990 points
63 views
0 votes
1 answer

Pushing to Git returning Error Code 403 fatal: HTTP request failed.

Hi@akhtar, Github seems to only support the ssh ...READ MORE

Jan 5 in Git & GitHub by MD
• 94,990 points
30 views
0 votes
1 answer

How to solve Permission denied (publickey) error when using Git?

Hi@akhtar, If the user has not generated an ...READ MORE

Jan 4 in Git & GitHub by MD
• 94,990 points
41 views
0 votes
1 answer

GitHub Error Message - Permission denied (publickey).

Hi@akhtar, I think GitHub isn't able to authenticate ...READ MORE

Jan 4 in Git & GitHub by MD
• 94,990 points
41 views
0 votes
1 answer

How to download single files from GitHub?

Hi@akhtar, Git does not support downloading parts of ...READ MORE

Jan 4 in Git & GitHub by MD
• 94,990 points
34 views
0 votes
1 answer

Update Git branches from master.

Hi@akhtar, You can do merge. That is actually ...READ MORE

Jan 4 in Git & GitHub by MD
• 94,990 points
33 views
0 votes
1 answer

How to undo pushed commits in Git?

Hi@akhtar, You can revert individual commits with: git revert ...READ MORE

Jan 4 in Git & GitHub by MD
• 94,990 points
32 views
0 votes
1 answer

How to get changes from master branch to a new branch in Git?

Hi@akhtar, You need to check out the branch and ...READ MORE

Jan 4 in Git & GitHub by MD
• 94,990 points
27 views
0 votes
1 answer

How to remove version tracking from a project cloned from git?

Hi@akhtar, All the data Git uses for information ...READ MORE

Jan 4 in Git & GitHub by MD
• 94,990 points
31 views
0 votes
1 answer

Link to the issue number on GitHub within a commit message.

Hi@akhtar, You just need to include #xxx in your commit message ...READ MORE

Jan 4 in Git & GitHub by MD
• 94,990 points
31 views
0 votes
1 answer

Merge test branch with master branch in Git.

Hi@akhtar, You can merge master into the test first so that ...READ MORE

Jan 4 in Git & GitHub by MD
• 94,990 points
32 views
0 votes
1 answer

How do I access my SSH public key?

Hi@akhtar, You can use the cat command in ...READ MORE

Jan 4 in Git & GitHub by MD
• 94,990 points
18 views
0 votes
1 answer

How to cancel a local git commit?

Hi@akhtar, You just need to use the git ...READ MORE

Jan 4 in Git & GitHub by MD
• 94,990 points
25 views
0 votes
1 answer

Cannot push to GitHub - keeps saying need merge.

Hi@akhtar, You can use the git pull origin ...READ MORE

Jan 4 in Git & GitHub by MD
• 94,990 points
21 views
0 votes
1 answer

How to ignore certain files in Git?

Hi@akhtar, The problem is that .gitignore ignores just files that ...READ MORE

Jan 4 in Git & GitHub by MD
• 94,990 points
22 views
+1 vote
1 answer

Error: src refspec master does not match any. error: failed to push some refs to 'ssh://xxxxx.com/project.git'.

Hi@akhtar, The most probable reason for this error ...READ MORE

Dec 22, 2020 in Git & GitHub by MD
• 94,990 points
219 views
+1 vote
1 answer

How to abort the merge conflict in Git?

Hi@akhtar, You can use the git reset --merge ...READ MORE

Dec 23, 2020 in Git & GitHub by MD
• 94,990 points
84 views
0 votes
1 answer

How to clone a specific Git branch?

Hi@akhtar, You need to specify the branch name ...READ MORE

Dec 22, 2020 in Git & GitHub by MD
• 94,990 points
149 views
0 votes
1 answer

How to make Git use the editor of our own choice for commits?

Hi@akhtar, You can set the editor name in ...READ MORE

Dec 23, 2020 in Git & GitHub by MD
• 94,990 points
49 views
+1 vote
1 answer

How to view the change history of a file using Git versioning?

Hi@akhtar, You can use gitk for this task. ...READ MORE

Dec 22, 2020 in Git & GitHub by MD
• 94,990 points
29 views
+1 vote
1 answer

How to create a remote Git branch?

Hi@akhtar, The easiest way is to create one ...READ MORE

Dec 22, 2020 in Git & GitHub by MD
• 94,990 points
31 views
0 votes
1 answer

What does cherry-picking a commit with Git mean?

Hi@akhtar, Git cherry-pick is a powerful command that enables arbitrary Git ...READ MORE

Dec 23, 2020 in Git & GitHub by MD
• 94,990 points
28 views
0 votes
1 answer

How to get the current branch name in Git?

Hi@akhtar, You can run the git branch command ...READ MORE

Dec 22, 2020 in Git & GitHub by MD
• 94,990 points
63 views
+1 vote
1 answer

How to discard unstaged changes in Git?

Hi@akhtar, You can save the unstaged changes in ...READ MORE

Dec 22, 2020 in Git & GitHub by MD
• 94,990 points
20 views
0 votes
1 answer

How to list all the files in a commit in Git?

Hi@akhtar, Using git diff-tree is considered as a preferred way ...READ MORE

Dec 22, 2020 in Git & GitHub by MD
• 94,990 points
45 views
0 votes
0 answers

How to find and restore a deleted file in a Git repository?

Hi Team, I have one Git repository. I ...READ MORE

Dec 22, 2020 in Git & GitHub by akhtar
• 38,120 points
72 views
0 votes
1 answer

How to move the most recent commits to a new branch with Git?

Hi@akhtar, If you want to move your commits ...READ MORE

Dec 22, 2020 in Git & GitHub by MD
• 94,990 points
36 views
0 votes
1 answer

Difference between git add -A and git add . command.

Hi@akhtar, The difference lies in which files get ...READ MORE

Dec 22, 2020 in Git & GitHub by MD
• 94,990 points
25 views
0 votes
1 answer

How to force git to completely forget about a file that is present in .gitignore folder?

Hi@akhtar, gitignore file is a text file that tells Git which files or ...READ MORE

Dec 22, 2020 in Git & GitHub by MD
• 94,990 points
26 views
0 votes
1 answer

How to reset or revert a file to a specific version?

Hi@akhtar, To revert a specific file to that ...READ MORE

Dec 22, 2020 in Git & GitHub by MD
• 94,990 points
19 views
0 votes
1 answer

How to revert a Git repository to a previous commit?

Hi@akhtar, This depends a lot on what you ...READ MORE

Dec 21, 2020 in Git & GitHub by MD
• 94,990 points
27 views
0 votes
1 answer

How to undo the most recent local commits in Git?

Hi@akhtar, There is one way available to undo ...READ MORE

Dec 21, 2020 in Git & GitHub by MD
• 94,990 points
24 views
0 votes
1 answer

How to modify existing, unpushed commit messages?

Hi@akhtar, The git commit --amend command is a convenient way to modify ...READ MORE

Dec 21, 2020 in Git & GitHub by MD
• 94,990 points
20 views
0 votes
1 answer

Difference between git stash pop and git stash apply.

"Git stash pop" deletes the last pushed ...READ MORE

Nov 20, 2020 in Git & GitHub by anonymous
233 views
+1 vote
1 answer

How to resolve merge conflicts in Git repository?

Hi@akhtar, You can try with git mergetool. It ...READ MORE

Nov 21, 2020 in Git & GitHub by MD
• 94,990 points
57 views
0 votes
1 answer

How to unstage a file in Git?

Hi@akhtar, Sometimes we accidentally add files in the ...READ MORE

Nov 19, 2020 in Git & GitHub by MD
• 94,990 points
197 views
+1 vote
1 answer

How to check out a remote Git branch?

Hi@akhtar, You can use the git checkout command ...READ MORE

Nov 21, 2020 in Git & GitHub by MD
• 94,990 points
34 views
0 votes
1 answer

How to pull from a Git repository through an HTTP proxy?

Hi@akhtar, You can set the HTTP proxy that Git ...READ MORE

Nov 21, 2020 in Git & GitHub by MD
• 94,990 points
47 views
0 votes
1 answer

How to save files in Git Stash?

Hi@akhtar, Git Stash temporarily save changes you've made to ...READ MORE

Nov 20, 2020 in Git & GitHub by MD
• 94,990 points
100 views
0 votes
1 answer

How to recover a dropped stash in Git?

Hi@akhtar, You can create a separate branch for ...READ MORE

Nov 21, 2020 in Git & GitHub by MD
• 94,990 points
33 views
0 votes
1 answer

How to stash untracked files of the current working directory in Git?

Hi@akhtar, In order to stash untracked files, add ...READ MORE

Nov 20, 2020 in Git & GitHub by MD
• 94,990 points
76 views