Skip to main content
The 2024 Developer Survey results are live! See the results
Greg Hewgill's user avatar
Greg Hewgill's user avatar
Greg Hewgill's user avatar
Greg Hewgill
  • Member for 15 years, 11 months
  • Last seen this week
11557 votes
Accepted

What is the difference between 'git pull' and 'git fetch'?

7754 votes
Accepted

How can I reset or revert a file to a specific revision?

6526 votes
Accepted

How slicing in Python works

4807 votes
Accepted

How do I make Git ignore file mode (chmod) changes?

4285 votes
Accepted

How do I delete a file from a Git repository?

3433 votes
Accepted

How do I escape curly-brace ({}) characters in a string while using .format (or an f-string)?

3154 votes
Accepted

How do I discard unstaged changes in Git?

2889 votes
Accepted

Indent multiple lines quickly in vi

2871 votes
Accepted

What's the problem with "using namespace std;"?

2526 votes
Accepted

Delete an element from a dictionary

2198 votes
Accepted

Replacements for switch statement in Python?

1774 votes
Accepted

Traverse a list in reverse order in Python

1771 votes
Accepted

What is the difference between a process and a thread?

1611 votes
Accepted

How can I move a tag on a git branch to a different commit?

1526 votes
Accepted

How to check if a number is a power of 2

1290 votes

How can I pass arguments to a batch file?

1290 votes
Accepted

What is an idempotent operation?

1181 votes
Accepted

How to add a changed file to an older (not last) commit in Git

1077 votes
Accepted

How do you find out the caller function in JavaScript?

979 votes
Accepted

What is HEAD in Git?

949 votes
Accepted

See changes to a specific file using git

929 votes

How do I delete a commit from a branch?

856 votes
Accepted

What are POD types in C++?

766 votes

How to use git to get just the latest revision of a project?

726 votes
Accepted

What does the term "porcelain" mean in Git?

711 votes
Accepted

Logical XOR operator in C++?

700 votes
Accepted

Why can't I change directories using "cd" in a script?

650 votes
Accepted

What is the largest TCP/IP network port number allowable for IPv4?

626 votes
Accepted

do { ... } while (0) — what is it good for?

573 votes
Accepted

What's the difference between JavaScript and Java?

1
2 3 4 5
180