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
-
5
votes1
answer13715
viewsUndoing a pull in Git
I have a project and at the moment I have 3 branches, the master, one dev and one that I needed to create in parallel to the dev for a funcionalidade the part, so far no news, my problem was that…
-
5
votes1
answer2115
viewsSwitch between branchs in GIT and changes remain in the current branch
Well personal I was with a doubt and when asking the question here on this same topic I am opening I answered myself but decided to continue to help someone who might have the same doubt. My…
-
5
votes1
answer907
viewsHow to recover deleted commit?
Consider the following story: In the local repository I commit A and B. I pushed to the repository on the server. I went back to the local repository and made changes. I removed commit B from the…
gitasked 9 years ago Filipe Moraes 8,737 -
5
votes1
answer246
viewsHow do I set up a project in Git and Github?
I own a project on Github called ProdRegex it does not contain any file, I have saved the project on my PC in the following path ~/Projetos C/Feichas Aula/ProjetoProdRegex where is all the files of…
-
5
votes3
answers1837
viewsGet back deleted files in Git
Friends, good afternoon. I removed some files inside the server, but I need them again, I have them in the git repository. How do I redownload the repository files?
-
5
votes1
answer6802
viewsHow do I resolve merge conflicts with git?
I had a merge conflict problem in git. This problem happened when two people were making the same modifications to the same file. The first person committed and I went to do another commit after it.…
gitasked 8 years, 6 months ago Jéssica Dias 161 -
5
votes1
answer267
viewsGit Pull removing files
I have the following problem: I’m performing one git pull and by bringing from the server something, the commit is automatically removing files. Example : removing Projeto/arquivoX removing…
gitasked 8 years, 6 months ago Matheus Domingos 161 -
5
votes4
answers1988
viewsIs there any way to know if I’ve done git push?
Whenever I need to update the repositories, I use the command git push. The problem is that sometimes I don’t know if I’ve pulled or not, by doing several things at the same time. Then to find out…
gitasked 8 years, 5 months ago Wallace Maxters 102,340 -
5
votes2
answers3965
viewsHow do you "synchronize" a branch with a master before working on it?
I’m in the following situation: I have a Git repository, and at a certain point I created a branch from master. I didn’t do much in that branch at the time, and then I advanced the master branch…
-
5
votes2
answers13078
viewsrun git pull without asking for a password
I wonder if there’s a possibility that I can cache my password for my git user so that I’m not prompted for the password every time I perform a git pull from the server, remembering that I’m not…
gitasked 8 years ago Jaison Pereira 53 -
5
votes1
answer711
viewsCreate a patch from a commit
When executing the command git apply it is possible to create a commit with changes from a text file: git apply ~/Downloads/patch.txt How do I create this patch from a commit existing?…
-
5
votes1
answer412
viewsDeploy using GIT on my server
Hello, I use it to upload my files from the GIT site, deploying to my server automatically so I did the following: 1 - I created a GIT repository on my server outside the public_html folder 2 - then…
-
5
votes2
answers304
viewsGet the remote name
In the bash Git, to update the branch place in use from a branch remote, we use the command: git pull nomeDoRemote nomeDoBranch Still in the bash, when navigating to a project directory, we see…
gitasked 7 years, 4 months ago Oralista de Sistemas 23,115 -
5
votes3
answers542
viewsWhat files for an MEAN project should I send to Github?
I created an MEAN project in MVC and I’m willing to put it on Github, but I’m not sure what to send. If I try to send the whole folder it makes a mistake saying that there are more than 2,000 files…
-
5
votes2
answers377
viewsGIT: 2-verse project on different clients and main branch
I have a question regarding the organization of GIT. I have 1 project that will be divided into 2 verses for different clients, I would like to maintain a main branch and that the general changes…
-
5
votes1
answer872
viewsGit error, can’t push
I went to give a push and this error occurred: error: src refspec master does not match any. What is the cause of this? Could someone help me?…
-
5
votes1
answer52
viewsPublishing packages in the NPM repository
How to publish a package I made in the npm repository for other programmers to test ?
-
5
votes2
answers3295
viewsHow do I stop sending package-lock.json by gitignore?
I can’t "ignore" sending package-lock.json for gitlab, when I run git status it appears to me to be sent. Follow a print showing the .gitignore and my terminal when running git status. File .…
-
5
votes1
answer103
viewsPrevent git merge when conflict exists
When I’m using Github for Desktop, and I pull or push, the App just tells me that a file is in conflict and nothing happens. but when I use gitbash, it automatically starts a merge. I’d like you to…
gitasked 6 years, 5 months ago user115802 53 -
5
votes4
answers25119
viewsHow to discard all commited changes?
How to discard all commited changes? Example: I have a project that has a few dozen commits, assuming that at a given moment I decide to discard everything which has not yet been confirmed via…
gitasked 6 years, 3 months ago Fábio Jânio 3,407 -
5
votes1
answer68
viewsGitlab does not display all changes
In one of the Gitlab repositories it turns out that 93000 lines were added in a commit. When I search for this commit locally, using commands like git log, git show for example, I have a return,…
-
5
votes2
answers470
viewsWhat are the dangers of accepting a branch merge with Behind commits?
Sometimes when I make one merge request in a project, it appears that there are commits Behind, I understand that, this happens due to the fact that at the time of creating my branch, based on the…
gitasked 6 years, 1 month ago MarceloBoni 6,385 -
5
votes2
answers1222
viewsHow to get out of git listing?
I have a project downloaded from the Github repository. When I execute the command git log within that project, it lists all the branches existing in the project, but I can’t leave the list. I’ve…
-
5
votes2
answers95
viewsIs doing unstable code commits in Git bad practice?
I have a very big change to make or I have cause of a class that has many relationships. Do I need to leave the project in a stable situation before doing local commits? Or is tested and stable code…
-
5
votes2
answers866
viewsGit - how to ignore files inside a folder
How do I view the folder without Versing all the files that are inside it? I have tried several ways and I can’t, either versioning the files or stopping the folder. I need it created for the proper…
gitasked 5 years, 10 months ago João Paulo Silva 177 -
5
votes2
answers1319
viewsJust take a commit from a github project?
I’m following a step-by-step project of a course, there they make a video lesson and at the end of it they commit to the github with the content made of that project in that class... In order to do…
-
5
votes1
answer7465
viewsHow to undo the last push done on Github?
I’m trying to learn Git and in the middle of my tests I made a push incorrect for Github. I did the reset of the latter commit and tried to give a push again thinking that it would remove the commit…
-
5
votes2
answers1359
viewsShould I commit my virtualenv to Github?
I did a project in Python using a virtualenv, in this case I should upload all virtualenv to Github or just the Python code?
-
5
votes1
answer240
viewsWhat does git stash create?
I always use the git stash, who ends up making a git stash push, and send it to a stack, and then retrieve the changes later using the git stash pop. So far so good, but I found that there is the…
gitasked 5 years, 4 months ago user155240 -
5
votes2
answers4605
viewsGIT - Commit to another branch
I am working on a project that has two branchs (master and dev). I started the implementation of a new Feature in the system but, halfway through, I realized I was making the changes in the master,…
-
5
votes2
answers291
viewsCmd text box functionality for Git
I’m developing a .bat, which will make a series of commands from the git predefined. But one of these commands, it is necessary that the user type an operation message. Follow the series of…
-
5
votes2
answers740
viewsHow do I perform a "merge commit" or "merge pull request" on "Github"?
I want to contribute to a project on github only that I don’t want to post a PR with 28 commits. How do I (on Github) join these commits?
-
5
votes2
answers206
viewsWhen to use GIT ADD?
I have a question regarding how to commit using GIT. For example, let’s assume I gave one git add in a file and performed the first commit. If I want to commit again, I need to use the command git…
-
5
votes1
answer150
viewsHow to remove a file from Git, but keep it locally?
When I have a file on my local computer that I would like not to be uploaded to the repository on Github, I simply create a file .gitignore and add the path file. It so happens that I would like to…
-
4
votes1
answer188
viewsHow to recover the number of commits made by a person?
What is the Git command to recover the number of commits made by a particular programmer?
-
4
votes4
answers1259
viewsGit merge between branches with submodules
I have a following mobile project. A repository where code is shared between several projects. I’ll call this repository. In the projects were created branchs of this base type because it was…
-
4
votes4
answers1075
views -
4
votes1
answer1896
viewsIgnore . classpath and . project on Github
I can’t ignore the . classpath and . project files on Github. These are already in my . gitignore but after a while always end up coming back. I’m using Eclipse + Egit. Follow my file . gitignore…
-
4
votes2
answers392
viewsGit push command with no apparent effect
A simple GIT question... I created a repository on the remote server and performed a git remote add (...), git add "files", git commit and git push origin master, on my localhost, so I could connect…
gitasked 10 years, 3 months ago Marcony Felipe 879 -
4
votes1
answer241
viewsstart Vagrant server in windows using git bash
As seen in the log below when starting the server such error occurs. Dei Bundle install and then tried to start the server. => Booting WEBrick => Rails 4.1.1 application starting in…
-
4
votes2
answers157
viewsWhy are some "git" commands preceded by a dash and others by two dashes?
I’m learning to use the git and I noticed that certain parameters are preceded by a dash while others are preceded by two. Example: git branch --merged git branch -d nome Why?…
-
4
votes2
answers23279
viewsHow to remove an old commit
I’m trying to remove a very old commit from my repository that was just to test git, I researched some solutions and came up with this: git rebase --onto (sha1) (sha2) or git rebase --onto HEAD~2…
-
4
votes2
answers330
viewsShould I wear rebase?
I’m working on a redesign of our web application, in a separate branch, say new_interface. Meanwhile, other developers remain in the branch master, mainly solving bugs. While some files may differ…
-
4
votes1
answer857
viewsSlow GIT console startup
Good afternoon, I’m having trouble booting my .git. It takes a while to load it. Typing any command takes about 30 s to 1 min. Which until another day, it worked normal. Very fast in any action I…
gitasked 9 years, 5 months ago user3527775 83 -
4
votes1
answer368
viewsHow to solve DIRTY_WORKTREE
I’m trying to merge the gitusing the eclipse, but it presents me with an error: DIRTY_WORKTREE "file name". I’ve tried to reverse the commit and resetar, but neither option works.…
-
4
votes1
answer190
viewsGit repository replication on local machine and Github
There is a way to replicate a particular repository between Github and a local machine the team uses? In case of failure of Github servers the team uses the local server and as soon as Github…
-
4
votes1
answer90
viewsIs there any way to get back to the last branch in git?
The title says it all. Around and a half we use the git as follows: git checkout branch_x git checkout branch_y git checkout branch_x x can be master, or some Feature branch whichever. I wonder if…
gitasked 9 years ago Anthony Accioly 20,516 -
4
votes2
answers2629
viewsHow do I "turn" a specific commit into a branch?
I’d like to take one commit previous specific and turn it into a brancho. Is there any way to do that in the Git?
-
4
votes1
answer3334
viewsClone private repository by passing password as parameter
I have a script on my production server that automates the entire process of checking new commits, generating the build and publishing the new changes. It works perfectly with open repositories…
-
4
votes1
answer31
viewsSVN externals in Git. Is there?
I have a common layer in my project that will serve two or more companies. I know that in the SVN there is the option Externals in which I refer an external repository to the repository of the…