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
-
7
votes1
answer4713
viewsWhat’s the practical difference between a git merge and a git pull?
In day-to-day developing I always use git pull to take the changes from the main branch, where the parallel developments are merged. But some Ides like Netbeans, implement the "git merge -ff origin…
gitasked 7 years, 2 months ago LeonanCarvalho 3,527 -
7
votes1
answer98
viewsGit, Doubt when I commit
I have a question when using git, and would like your help. I have the following situation: I’m developing a new feature in my application, but I haven’t completed it. Let’s assume I’m developing it…
-
7
votes1
answer632
viewsHow to delete a file from all commits?
In my first commit I sent a binary file that has no reason to stay. And I sent a configuration file with real passwords. I changed the password to a fake one, deleted the binary, but if you go back…
gitasked 6 years, 5 months ago eduardo.mazolini 130 -
7
votes3
answers1181
viewsIs GIT Staging Area useless?
I understand the workflow regarding the process that leads to a commit (working directory -> staged area -> repository), but I still can’t understand the usefulness of Staging Area in…
gitasked 6 years, 3 months ago Allan Dantas 359 -
7
votes2
answers10525
viewsDifference between "git add --all", "git add ." and "git add -u"
The command git add --all It seems to me like the command git add ., but I’m not sure they’re the same thing. If they’re not, what’s the difference between them? I am also doubtful about git add -u…
gitasked 6 years, 2 months ago João Pedro Schmitz 2,974 -
7
votes3
answers9654
viewsHow to give permission to other users to upload content to my project on Github
I am doing an academic work and created a project and wanted each member of the group to create a branch and upasse part of the code used at work, but when someone tries to create a branch in the…
-
7
votes1
answer2286
viewsWhat is the difference between "git push" and "git Sync"?
After I make one git commit to save the changes to my local repository, I can upload them to the remote repository using both the command git push how much using the command git sync. What’s the…
gitasked 5 years, 8 months ago Thiago Krempser 1,878 -
6
votes1
answer271
viewsIntegration with GIT
I wonder if Git provides an integration API, like I’m developing a C# application and would like to know if there’s any way to get the files from the latter Commit. I took a look at the GIT website,…
-
6
votes2
answers2487
views.gitignore delete all folders but one
I need to make that one .gitignore delete from versioning all folders except one. Example: Library/nao_ignorar Library/ignorar Library/ignorar Library/ignorar ....…
-
6
votes3
answers326
viewsbitbucket - doubt about workflow, branchs and merge
My team and I started working with git for version control (later I know), and used bitbucket as a remote repository (because it allows free private repository). Well, I have some questions for the…
-
6
votes2
answers215
viewsWhat are Git mod sets really?
I’m starting now to use Git and one thing I heard in the course I’m looking at is this: what Git actually stores is not the different versions of the files, but rather sets of modifications. That…
-
6
votes1
answer10284
viewsHow to remove a remote branch in Git?
To delete a local Git branch, just use the command git branch -d <branch>, but how to get this same branch removed on the remote server?
gitasked 9 years, 8 months ago Fábio Perez 1,662 -
6
votes4
answers15428
viewsHow do I remove local files(untracked files) from my current branch(branch) in Git?
How to remove these files from my current branch(branch) in Git?
gitasked 9 years, 6 months ago Paulo Costa 3,976 -
6
votes2
answers459
viewsWhat does "Auto Packing the Repository for Optimum performance" mean?
I went to give git push in a remote repository and the following message appeared: Auto packing the repository for optimum performance. You may also run "git gc" manually. See "git help gc" for more…
-
6
votes2
answers3602
viewsStore credentials from a Git repository on Windows without SSH
How to set up Git in a local repository so you don’t ask for the login and password every time you push or pull? My Git server does not support SSH. HTTP only. I have only the username and the…
-
6
votes3
answers14615
viewsChange remote git repository
I am using an online tool to make version control of my repository git, would like to change the remote to use another reference. How to change the remote repository (origin) git?…
-
6
votes2
answers15001
viewsHow do I ignore a file after it’s already in a commit?
I accidentally added some images in my repository. But now I want to ignore them, but it is not obeying the data that was added in .gitignore Example: public/imagens/* How do I make a file or…
gitasked 8 years, 9 months ago Wallace Maxters 102,340 -
6
votes1
answer424
viewsHow do I use a Github project as the basis for a new one?
I’m trying to use the angular-phonecat as a basis for a new project, and make modifications on top of it, because the structure is very similar to what I want to develop and so I wouldn’t have to…
-
6
votes3
answers982
viewsGIT, display of branchs in bitbucket tree
Hello! I’ve been researching for days and I haven’t found any information that helps me. my problem is with displaying the commits tree and branchs in bitbucket. I create a branch from the master…
gitasked 8 years, 4 months ago Fernando Rodrigues 61 -
6
votes2
answers589
viewsBranch x Checkout x Merging automatico for master
Help! If anyone’s been there or knows how to help, I’ll thank you. created a branch: git branch <xxxx> changed to new branch: git checkout xxxx I changed a file line inside the branch xxxx I…
-
6
votes2
answers6368
viewsHEAD is Detached in Repository
I’m using NETBEANS and GIT. I made a few changes to when the commit is giving this message: HEAD is Detached in Repository My repository is like this:…
-
6
votes2
answers174
viewsHow do I create an alias to run multiple commands with git?
I wonder how to create an alias for git that runs the following commands: git add (all modified files) git commit (including a message) git push I tried the following gitconfig setting: [alias] upl…
-
6
votes1
answer16437
viewsGIT Switch branch without commiting or discarding current changes
I need to submit my current changes to another branch. When giving git branch-name checkout it asks me to commit or change the current changes, I don’t want any of those options. How can I proceed?…
-
6
votes1
answer5685
viewsHow to unlink local directory from remote repository?
I need to switch machines and unlink the local directory from the repository to use it only on another machine. How can I do this untying?
-
6
votes1
answer2779
viewsWhat is Initial Commit?
I’m learning to use Git, and I wanted to understand what this initial commit line looks like in the video class I’m seeing but it’s different in my environment. I want to understand what it’s for…
gitasked 7 years ago Giovane Machado 371 -
6
votes2
answers405
viewsHow do you force git to keep a directory but ignore all the files inside it?
I have a certain folder and logs which is essential to the functioning of my application. I would like to add the same in my repository, for those who replicate does not want to keep creating the…
gitasked 7 years ago Wallace Maxters 102,340 -
6
votes1
answer691
viewsGIT error sending project to Ionic Pro: fatal: sha1 file '<stdout>' write error: Broken pipe
I signed Ionic Pro and I’m trying to send my local project to their Cloud. I use the command: git push ionic master It starts all right but makes the mistakes to follow: git push ionic master Enter…
-
6
votes1
answer89
viewsHow to clone only one subdirectory of github
Assuming you have a dummy directory on github: https://github.com/fulano/Diretorio And within "Directory" have the subdirectories: https://github.com/fulano/Diretorio/sub1…
-
6
votes2
answers217
viewsWhat’s the difference between git reset -- <file_name> and git reset HEAD <file_name>?
To remove files from staged area I use the command: $ git reset HEAD <file_name> However I accidentally applied the command: $ git reset <file_name> I forgot the HEAD of command. In…
gitasked 6 years, 3 months ago Allan Dantas 359 -
6
votes2
answers694
viewsWhat are semantic messages in Git?
Eventually, when I browse some of the Github repositories, I come across certain messages from commit standardized: feat(*): initiate re-write Or: refactor(*): remove unwanted files What are these…
-
6
votes3
answers4481
viewsDifference from: "git commit -am" and "-m"
What would be the difference between typing: git commit -m "Teste" and git commit -am "Teste"? I’m learning about Git and would like to know how to differentiate it.…
-
6
votes1
answer1288
viewsHow do I delete a commit from github history?
I would like to delete a commit made on github but WITHOUT deleting the changes, which is why I discovered that in one of my files the code contained personal information and by altering it that…
-
6
votes2
answers125
viewsMerge two features
I have 1 branch in my project 1 - Master I created 1 more branch and developed 1 Feature. I now have 2 branchs 1 - Master 2 - feature1 I started to develop another Feature and now I have 3 branchs 1…
gitasked 5 years, 2 months ago Leandro Castro 306 -
6
votes3
answers230
viewsCode shortcut for multiple git commands
How do I have only one command run another automatically on git? Example: When sending git atalho perform the following instructions: git status git add Post.txt git commit -m "aqui coloco uma…
-
6
votes3
answers11154
viewsCreate local branch from a remote branch
I have a cloud branch on Github called x1 and I need to create a local branch called xlocal from that cloud branch called x1. How do I do that?
-
6
votes1
answer283
viewsGIT LOG: How do I search for a commit through a specific message?
I wonder if there’s any way to use the git log to list commits, filtering through a specific message. Example: git commit -am "Correção do ícone de exclusão na listagem de usuários" In the above…
-
6
votes2
answers135
viewsIs it possible to delete previous commits and only remain the current one?
While I was modifying the profile README, I ended up making many attempts and solving some errors, it generated me 90 commits in a single file. I wonder if you can delete all the previous commits…
-
5
votes2
answers483
viewsHow to show the files that need to be commited?
How to show files that need to be "commited"? Or, there’s some program, for Linux-based distro, that behaves like the Eclipse Git module, that shows me the files that need to be added and "commits"?…
gitasked 10 years, 9 months ago Luiz Picolo 649 -
5
votes1
answer1334
viewsGit accuses that ignored directory has modified content
I have the directory contents in my file .gitignore, as follows: app/dir/* But when I give a git status, git accuses the following: # On branch master # Changes not staged for commit: # (use "git…
gitasked 10 years, 8 months ago bfavaretto 64,705 -
5
votes1
answer212
viewsIntegration test connected to an FTP
It is possible to-or if there is a tool that enables me to send certain purchases of a project to an FTP after it passes a continuous integration test (Travis-ci for example)? The idea is that after…
-
5
votes2
answers4228
viewsHow to clone GIT repository with all branches and tags
In GIT it would be possible to clone a repository and already download all branches and tags There would be a single command for this, without the need to create a shell script?…
gitasked 10 years, 7 months ago Douglas Cabral 345 -
5
votes1
answer161
views"unveil" folder in GIT
I had an altered file in the vendor folder that was in gitignore, then I gave a message and I didn’t read it :( and gave a git -f add . and forced to add the file that was in gitignore, so he added…
gitasked 10 years, 3 months ago Daniel Lemes 661 -
5
votes1
answer162
viewsNumber of revisions per file saved via Git
I have a very specific need, I need to store at most 3 revisions of a PSD file, and every new revision the older one is deleted. You can do this in Git?
-
5
votes2
answers1712
viewsHow to Commit Deleted Files from Local Project?
DESCRIPTION: I have a relatively common problem, but it slows me down a lot in the project, so let’s go. Suppose I have a project with the examples directories: css, dist, src, js, fonts, and some…
gitasked 9 years, 11 months ago Vinicius Colares 1,352 -
5
votes1
answer9108
viewsHow do I update Github repository after changing files locally in Git?
After I created a repository on Github and uploaded some files to that repository, I had to make some changes to the file, made the commits, but I don’t know how to send these changes to Github. How…
-
5
votes2
answers22077
viewsGit does not send commits to server. Error: Everything up-to-date
When giving the command: git push origin master git does not send the information and gives the following error: Everything up-to-date I realized that the master of my local repository is not…
-
5
votes2
answers2783
viewsAdd new file to commit
How do I add new files to a commit already done in Git without creating a new commit? If you have already pushed to the remote server, like "re-commit"?
-
5
votes2
answers1430
viewsCopy files from one remote to another using GIT
I have two configured remotes, origin (Heroku repository) and github (github repository). In my local repository I made several changes but I gave the "push" only in origin, leaving github without…
-
5
votes4
answers11166
viewsRecover a file in GIT
I have two folders (test-git1 and test-git2), in both I gave a clone of the server repository. If I accidentally delete a file inside the test-git1 folder, how do I recover it? I tried to give git…
-
5
votes2
answers768
viewsGit repository size problem
At the company where I work, I was using Git to save a system, where three people use it. After, by accident, an image folder is sent, make a git pull has become absurd, since the downloaded data is…
gitasked 9 years, 7 months ago Wallace Maxters 102,340