Most voted "git" questions
Git is an open-source distributed version control (DVCS) system. Use this tag for Git-related questions, DO NOT USE for programming issues involving a Git repository.
Learn more…924 questions
Sort by count of
-
151
votes3
answers25811
viewsWhat are the differences between Git, SVN and CVS?
What are the advantages, limitations and main differences between these 3 versioning systems, Git, SVN and CVS?
-
60
votes7
answers8794
viewsHow to Convert Mysql Database?
In the development of a web portal, using the git we made the control of everything that was changed at code level in the approval environment and with the Jenkins We moved the site to the…
-
59
votes3
answers74263
viewsWhat is the difference between the 'git pull' and 'git fetch' commands?
I’d like to know the difference between the commands git pull and git fetch in git versioning software.
-
44
votes5
answers7270
viewsWhat is the difference between a "branch" and a "tag"?
In Git, what is the difference between a branch and a tag?
-
42
votes3
answers105525
viewsHow do I get the project back to a specific commit?
Assuming a condition where, I have a project with 20 commits, and I decide for inexplicable reasons to go back some independent commits if I want to go back 4, 5 or 10, assuming the description of…
-
37
votes3
answers39504
viewsHow does the git rebase command work?
What happens when you rebase in the following situation: Branch master with 3 commits (A, B and C). After committing C, I created a new branch with the name design. I committed (D) to the design…
gitasked 9 years, 3 months ago Filipe Moraes 8,737 -
36
votes3
answers2113
viewsWhy use Git for individual development?
In 2008 I asked an OS question about version control for solo developer and received an excellent response from Jon Skeet indicating the use of SVN. Unfortunately it was recently closed and removed.…
-
33
votes2
answers29427
viewsGit warning: LF will be replaced by CRLF
I created a file called tests.html inside a folder. After typing: git add tests.html Message appeared: Warning: LF will be replaced by CRLF in testes.html The file will have its original line…
gitasked 9 years, 11 months ago Van Ribeiro 1,482 -
32
votes6
answers98339
viewsHow do I undo the last commit in Git?
I accidentally committed the wrong files to Git. How to undo this?
-
31
votes3
answers97159
viewsHow do I delete a local and remote Git branch(branch)?
I want to delete a local branch and in my remote project on Github.
-
28
votes4
answers15336
viewsIn Git, how do I edit the description of a commit already made?
In case you need to change the description of a commit, to make the description clearer, or to specify which Issue he is bound. I would like to know how to edit the message that accompanies the…
-
28
votes1
answer39248
viewsHow do I undo a "git add" before a commit?
I added by mistake arquivos using the command git add and I haven’t executed one yet git commit. There is a way to undo or remove these files from the commit?…
gitasked 9 years, 6 months ago Paulo Costa 3,976 -
26
votes3
answers31330
viewsHow to edit an incorrect commit message in Git?
How to edit an incorrect commit message in Git? Examples can be cited?
gitasked 9 years, 6 months ago Paulo Costa 3,976 -
22
votes2
answers4841
viewsHow does the merge work?
I created another branch as backup and give merge in it, suppose I’m in branch daniela3: git merge origin/develop Only my branch daniela3 will be affected or origin/develop too? I mean, I’ll be…
-
22
votes2
answers4822
viewsWhat would be the best practices for commits in Git?
There are best practices to perform commits and write comments on these commits, for better communication and understanding during the software development process?
-
22
votes3
answers7920
viewsWhat is the difference between "git init" and "git init --Bare"?
The question is very simple indeed: What is the difference between these two commands, git init and git init --bare? What is this option for --bare?…
gitasked 9 years, 3 months ago Wallace Maxters 102,340 -
22
votes2
answers2203
viewsWhat are the differences between the states of the git files (untracked, unmodified, modified, staged)?
I’d like to know what the characteristics and differences between the states of the archives during its life cycle in the git. States: untracked unmodified modified staged…
-
21
votes3
answers5937
viewsHow do I see which commits change a certain file?
I implemented a new functionality for my program in an Func1.cpp file, in the branch Func1. Then I created another feature - in the file Func2.cpp -, but I forgot to create in a branch separate…
-
20
votes1
answer25509
viewsWhat exactly does git checkout branch -- . do?
I would like to understand this command in an easier way, I did some tests but I’m not quite sure of the conclusion. I have two branches, the master branch and the new branch, and I did the test…
gitasked 8 years, 3 months ago Sérgio Mucciaccia 2,745 -
20
votes1
answer7076
viewsWhat’s the point of git push -u?
I’ve seen a lot of people asking questions about possible errors in GIT and noticed that sometimes it involves -u. For example Error in Android Studio 2.3 Integration with Gitlab and Error while…
-
19
votes4
answers551
viewsWhen are branches useful in Git?
I’m studying Git and from what I’ve seen about branches I’ve basically identified two major situations where branches are useful: When we have a stable version of the code in the master branch and…
gitasked 9 years, 9 months ago SomeDeveloper 18,074 -
19
votes2
answers18808
viewsWhat’s a pull request for?
I am working as a team in bitbucket and I would like to know what a pull request is for. On what occasions we should use this feature.
-
19
votes2
answers288
viewsWhat is a "dangling Object/commit" in git?
My repository has momentarily corrupted after the yesterday’s blackout in Brazil. I managed to heal the corruption (thus) and decided to run a git fsck to check the status of my local repository.…
-
18
votes3
answers14753
viewsHow do I remove a folder from Git’s history?
I started a while ago to develop a web page, which is well organized, has folders for everything, example from the root of the repository/project: account/ products/ js/ css/ img/ data/ *(pdfs e…
gitasked 10 years, 11 months ago António Almeida 600 -
17
votes4
answers1730
viewsHow to maintain a project in 2 repositories?
I have a project and wanted to keep it in Bitbucket/Gitlab and Github at the same time. This is possible? I need them to work simultaneously so that if I want to do one push only in Bitbucket can I.…
gitasked 5 years, 9 months ago Giovanni Dias 712 -
16
votes3
answers10940
viewsHow to recover the previous commit?
After you have added modified file and have given commit, I had to modify the whole structure of the code, but it didn’t work and I wanted to have access to the previous code again. How do I…
gitasked 9 years, 11 months ago Van Ribeiro 1,482 -
16
votes1
answer20057
viewsWhat do these words mean in Git/Github: Fork, clone, track?
It’s not long since I started using Git and until this week I only used it through the Visual Studio interface. After a lot of problems with Git for the interface, I started solving some things on…
-
16
votes6
answers12128
viewsError typing GIT PUSH
I’m on my machine and want to upload the files on my local machine to my repository on github with.. I’ve already executed the commands git add, git commit and all that remains is to raise them.…
-
15
votes5
answers3666
viewsHow do I know the last commit to move the same file as my commit?
I actually read the question How do I see which commits change a certain file? It’s almost what I need, in case what I want to know is if it’s possible I get the last commit that changed any file…
gitasked 10 years, 1 month ago Felipe Avelar 9,507 -
14
votes4
answers17336
viewsHow do I copy commits from one branch to another?
I’m using the following workflow with git: I set a task I create a branch for her from the master Implement the task I pull on the master I merge my branch into master I push the master However, I…
-
14
votes3
answers3855
viewsDifferences between Git and Mercurial
What are the main differences, advantages and limitations of these two distributed version control systems? If anyone has practical experience in both (for example I only know the Mercurial more…
-
14
votes2
answers877
viewsIs there a specific rule for commit messages in versioning systems like Git?
The people here where I work, for a certain period of time, used to not care about the messages that they wrote when making a git commit around here. It seems that Git was simply "a place to save…
-
14
votes2
answers22374
viewsHow do I delete commit from a branch in Git?
How can I exclude commit of a branch? I made an attempt to try and delete one commit I didn’t want to, but I ended up making the situation worse. I’m afraid to do something wrong. Git tells me to…
-
14
votes1
answer41436
viewsFatal: Not a git Repository
I created a la repository on Github and then went to play files through Git using cd C:\Users\Nikolai\Desktop\exercicios-c git remote add origin https://github.com/NikolaiCinotti/exercicios-c.git…
-
14
votes3
answers702
viewsIs there any way to make Git ignore space-related modifications or line breaks?
I have a refactoring craze. If I see something missing or with line breaking excess, the first thing I do is fix. I’m using Visual Studio Code in a project and I use GIT to do version control. These…
gitasked 6 years, 11 months ago Wallace Maxters 102,340 -
14
votes3
answers2334
viewsWhat are the differences between "soft, Mixed, hard" in git reset?
I would like to understand better what each type of reset in the git makes with the file(s) (s): Types: $ git reset --soft [commithash] $ git reset --mixed [commithash] $ git reset --hard…
-
13
votes2
answers1282
viewsHandle large files with GIT
Setting Some time ago, I tried to use GIT to restore some backups, mostly small files, git behaved very well by versioning them when the changes from one commit to another weren’t big, but on a…
-
13
votes1
answer1771
viewsHow to perform automatic pull with Git?
Imagine that I have a test environment for a web application, where there is a cloned Github repository that is directly inside the server, and any modification in it already results in a real-time…
-
13
votes1
answer1179
viewsAuto Deploy after Git Push
I use daily the Openshift to create and host applications in the clouds. One interesting thing I observe is as to the process of deploy applications hosted on this platform. deploy is preceded by…
-
13
votes3
answers1303
viewsWhat is a git submodule for?
One day I went to clone a library in the github and there was an instruction to use the command git submodule update. I’ve been working with the git and until then had no knowledge of this command.…
gitasked 8 years, 9 months ago Wallace Maxters 102,340 -
13
votes2
answers12902
viewsWhat’s the difference between git pull and git pull --rebase
In git I have the possibility to make a git pull origin master and a git pull --rebase origin master. I’d like to know the difference between the two.
gitasked 6 years, 8 months ago Yago Azedias 1,117 -
12
votes2
answers5931
viewsgit merge or rebase
When I program using git, I always use merge from my branch in master to add new code, but some graphic tools like smartgit rebase instead of merge. I must use the command rebase or merge to add my…
-
12
votes2
answers10072
viewsHow to rename a local branch in Git?
How do I rename my local Git branch? I don’t want to rename a remote branch, I want a simple way to rename my local branch.
-
12
votes3
answers1828
viewsHow does version naming work for private or public projects?
I’m developing a project that serves as bootstrap for future contributions via Git, and would like to know which version scheme is most used, say "version" relative to the state the software is,…
-
12
votes2
answers1088
viewsHow to work efficiently with branch in git?
I’m trying to define a working scheme to keep my repository on Github organized, but it is difficult to reach a solution. My "idea": I thought about keeping the branch in the remote repository…
-
11
votes5
answers838
viewsIs it possible to integrate GIT with some task manager?
Is there any way to integrate some task manager (let’s say, Trello) where the developer, when giving a commit in his activity, makes the association of the same with some specific task? In research…
-
11
votes1
answer262
viewsHow do I change the language of Git to English on Linux?
I’m using Git on the Linux terminal (Ubuntu), and it’s in English. In the master business Initial submission. nothing to send (create/copy files and use "git add" to register) How I can change Git…
-
11
votes3
answers39830
viewsConfigure . gitignore to not upload certain files
I am developing a project. Net and would like to add some files to not go up on Github through the .gitignore. I started researching about and saw some solutions, of which I did not understand. So…
gitasked 7 years, 2 months ago gabrielgrs 457 -
11
votes1
answer655
viewsgit fetch: "inflate: data stream error" and "SHA1 COLLISION FOUND WITH"
I have on my machine a copy of the repository for work, another for maintenance and a third just to resolve conflicts of merge request. The external repository is in the https://gitlab.com In the…
gitasked 7 years ago Jefferson Quesado 22,370 -
11
votes2
answers2106
viewsWhat is the importance of README.Md in Git?
I have some doubt about the use of README.Md because I have never used in any project and I want to know what is its purpose.
gitasked 6 years, 6 months ago Mike Otharan 896