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
-
2
votes1
answer1795
viewshow to undo "git checkout" from a specific commit and go back to the last commit I did before checkout
I need to get back to the environment I was before I realized git checkout id_commit but when I execute git log no longer appear the commits I realized after the checkout. In the remote repository…
-
2
votes1
answer95
viewsHow to protect my account from unauthorized`pushs`?
I’m starting to use the git repository, through gitlab, but I’m using it on a company computer where I work. Assuming I leave the company and leave the setup ready, how can I block a new programmer…
-
2
votes1
answer241
viewsImport github code for eclipse Oxygen
I have a code that I would like to import into my eclipse by downloading the zip, however at the time of importing the following error No Projects are found to import Searching for git features ,I…
-
2
votes1
answer146
viewsProblem when merging
I’m doing merges, and in this action, accented characters are being swapped for symbols, I still don’t know what the source of the problem is, if it’s the encoding of the files, or if the problem is…
-
2
votes1
answer166
viewsGit flow - batch commands
Each time you finish a branch, whether it’s release, Feature or Hotfix, I have to follow a series of commands to publish the changes to my repository. For example: I’ll finish a Hotfix of name ht001…
-
2
votes1
answer1036
viewsHow Workflow Works with Pull Request
I’m willing to work with Pull Request in Git, but I don’t understand how it works, I know when I contribute to a project, I have to do Fork, Branch, Commit and Pull Request, and then the owner of…
-
2
votes1
answer197
viewsWhat does the -n command in git mean
They gave me a command to see the last commit of a file that was deleted, I know what it means all subcommands but I don’t know what the command means -n, see the example of the command below: log…
gitasked 6 years, 5 months ago Lucas Lima 773 -
2
votes2
answers843
viewsHow to activate version control in Visualcode?
I’m having difficulties in using Visualcode version control, all the changes I make in the system are not going to version control, my question is if I need to install a specific extension for it to…
-
2
votes2
answers69
viewsMerge a Feature with multiple commits over time into another project
Has a Feature tenis with multiple commits over time, and need to merge this another project. Consider this time line: - x - tenisV1 - x - x - tenisV2 - x - tenisV3 - x - x - x - x - x - tenisV4 I…
gitasked 6 years, 3 months ago Edson Horacio Junior 1,568 -
2
votes2
answers434
viewsWhat’s the difference between the remote Github repository and the remote one on my dedicated server?
On Github we can create remote repositories, and when we do we gain a certain set of administrative functionalities under this repository, one of these functionalities is the administrator’s ability…
-
2
votes1
answer99
viewsHow do I work with github when A2F is enabled?
By enabling two-factor authentication on Github I am required to work with RSA key to update repositories? When A2F (Authentication Two-Factor) is active unique code is requested, I imagine Git…
-
2
votes1
answer398
viewsProblems with git merge
Guys, I’m having a problem I’ve never caught before with git.. In our flow we have a branch called DEV which is where everyone else comes out. And all tasks after finishing go through a merge from…
gitasked 6 years, 3 months ago Paulo Gustavo 1,319 -
2
votes1
answer870
viewsI made changes to the wrong branch, how do I reverse the changes in this branch without deleting what was done?
I was working on a branch called task-1. I accidentally switched branches and made several modifications to the task-2 branch. How do I reverse the changes in the task-2 branch without committing…
gitasked 6 years ago João Filipe 123 -
2
votes1
answer35
viewsGit and Github: Need to remote more than once?
When I’m going to do the procedure to upload the files from my directory to Github, through Git, I need to give git remote add origin ... every time or only the first time is enough?…
-
2
votes1
answer348
viewsGit - Ignoring files with . gitignore
Someone can explain to me clearly the difference between the use of the commands below in the file . gitignore ? /pasta pasta/…
-
2
votes2
answers510
viewsHow to return the git add --all command
I ended up using this command improperly, and added many files that should not, wanted to return the previous state, command git reset HEAD <file> returns only one file, and as there are many…
-
2
votes1
answer116
viewsVisual Studio - GIT - 5000 changes
Guys, help me out... Look at the image below, any kind of change it asks to go up to GIT... How to remove this, can help me…
gitasked 5 years, 10 months ago Alex Lopes 21 -
2
votes1
answer713
viewsGit - Change commit message
How do I change the message I made in a particular commit? Example: Primeira Mensagem 1212121 Segunda Mensagem 8989898 I’ve tried with: git rebase -i HEAD~2 git commit --force but it didn’t work...…
-
2
votes1
answer48
viewsBitbucket management
Hello. I work in a company where to manage the projects we have a Bitbucket account that we treat as an administrator, and in addition each of the employees has their own account. All projects must…
-
2
votes1
answer1628
viewsHow to copy SOME files from one branch to the other?
I have 2 branch, "B1" and "B2". I need to copy files from "B2" which is more evolved and move to "B1", but some files I don’t want. How do I?
-
2
votes2
answers945
viewsRemember Git user and password when commiting
Every time I commit, Git asks me for my username and password. Is there any way to cache credentials and avoid having to type all the time? Use git repositories with HTTPS and non-SHS connection.…
gitasked 5 years, 8 months ago Thiago Krempser 1,878 -
2
votes1
answer131
viewsWhat’s the best practice for solving the problem with git?
Next, the scenario is: In my work there is a project with only one branch to master. They had commits that broke the version that was in production. So when I took the project, I needed to clone the…
-
2
votes2
answers2049
viewsVisual Studio and Github - Which files to ignore (C#)
Hello! I’m studying C# and created a repository on Github to save the exercises. When starting a new project, Visual Studio Community (2017) creates the following structure: PastaDoProjeto/…
-
2
votes1
answer484
viewsChange source branch
Have a way to change the source branch of my current branch? Ex.: I created a new branch from branch A, but at a certain point, I realized I should have created it from branch B and not from branch…
-
2
votes1
answer820
viewsEncoding problem in Git
I did clone a large project but many of the files were in unstage and Deleted. I realized it was the file name encoding so I set it in utf-8 like this: git config gui.encoding utf-8 After that the…
-
2
votes1
answer714
viewsWhat are the differences between "checkout, revert and reset"
I would like to know the difference between the commands below: git revert commit ; git reset --hard commit ; git checkout commit ;
gitasked 5 years, 3 months ago user158832 23 -
2
votes1
answer52
viewsHow to make Git case sensitive?
My operating system is not case sensitive by default, which means that there is no difference between capitalizing the letters of a filename, for example. This behavior constantly gets in my way…
-
2
votes1
answer79
viewsHow do I manage a git for two domains?
I have a website that I’m working on, where we’re now starting to install version control and we’re having a hard time testing the site before sending it to production. We have the following…
-
2
votes2
answers3924
viewsChange language on github
I have a project developed in Python with Django. I just created a repository and pulled on github and the project was set to PHP on the Github website: Some images of my project and its files: So:…
-
2
votes1
answer236
viewsGitignore, Ignore a file without deleting it from versioning
I need to ignore any modification in certain files, but when modifying anything (in those files), it recognizes the change and stays to commit, follows my . gitignore #Arquivos Diversos *.log *.yml…
-
2
votes2
answers384
viewsHow do I find a particular file in all branches?
First search: I need to find a branch or commit that has a file that was lost... but I have multiple branches and multiple commits in each of these branches... The file created would be called:…
gitasked 4 years, 11 months ago Ivan Ferrer 12,096 -
2
votes1
answer133
viewsIs there any way to force the stash override on the current modifications?
When I use the remote git stash to hide the changes, sometimes you need to change that same file, while it is already hidden by Stash. When I try to apply one git stash pop, but at the same time one…
gitasked 4 years, 11 months ago Wallace Maxters 102,340 -
2
votes2
answers603
viewsHow do I remove and replace files from the master branch with files from another branch? (Github)
Dear friends, my question is this:: I needed to download a project on another machine, so I did a clone on Github for that, but I changed the whole file structure, and I wanted to go up to the…
-
2
votes1
answer425
viewsremove an improper commit from history but keep current changes in files
I cloned a remote repository and soon after that I had to pull some files from a specific branch and it looks like it was merged (unintentionally) into the master itself, then created a new branch…
-
2
votes2
answers88
viewsTypescript files in version history
I started using Typescript in my web project to generate the Javascript files and my question is: In the version system I should put only the Javascript files, Typescript or both?
-
2
votes1
answer29
viewsGIT: Permission error in git merge
Utilizo Ubuntu. A strange thing happens. I have the main project in the master branch and made a new branch for changes and tests. When I create new files in this new branch everything is ok, no…
-
2
votes1
answer58
viewsList only the added files and modes in the git cast
I’m having trouble dealing with file permissions in git. In this case, I need to check if the file has been added with the correct permission mode. As for changing the permissions mode, you already…
gitasked 4 years, 6 months ago Jefferson Quesado 22,370 -
2
votes1
answer118
viewsHow to make Cherry-pick from another git repository?
I wanted to know how I copy a commit from one project to another. I thought it would just be git cherry-pick 76a99b8c395ebbc40a07c04dc9e0d9fefc9982cd, but that’s only if I’m within the same project,…
-
2
votes2
answers398
viewsHow to use GIT to list the changed files in the branch
How to view the list of all the changed files in one branch without having to inform the commit X until commit Y. I was using the following command below to list the commit’s and get the Hash of…
gitasked 4 years, 3 months ago Mauro Rocha 114 -
2
votes1
answer75
viewsReversing the commit
Talk guys, I have a problem in my repository. I want to revert the repository to a previous commit, in which case it would be the commit that’s in red. commit…
-
2
votes0
answers126
viewsProblems with deletion of git files
Recently, I had a conflict problem between my local branch impl-springboot4 and the remote branch master. At the time of MERGE via Pull Request, there was conflict where I had to enter the…
-
2
votes1
answer38
viewsUnlink of file 'debug.log' failed. Should I Try Again?
I did several git stash in my branch normally. But now when I pass the command: git stash save "teste" he answers: Saved Working directory and index state On dev: testing Unlink of file 'debug.log'…
-
2
votes1
answer121
viewsHusky and commitlint do not work before the git commit command
The Husky and commitlint packages were installed to a Nodejs project with the intention of adding Hooks to the commands git commit to maintain the same style guide in commit. However the Hooks are…
-
2
votes0
answers61
viewsGithub - How to accept PR automatically after revisions?
I’m doing a project on Github and I’d like to structure something that after a certain amount of approvals in the revision, that happens to merge the pull request automatically. I know this is…
-
1
votes1
answer4691
viewsGIT/Github Versioning Conflict for the same branch and only one commiting user
I am harduser and experienced programmer, but a problem has occurred: to a private repository on Github, with only one user committing, eventually when sending code I receive notice that it has been…
-
1
votes2
answers2639
viewsHow to add an empty directory to a remote git repository?
I have a PHP application that needs to upload photos to a remote directory, but this directory needs to be created earlier in the repository so that these files can be uploaded. But when I send this…
-
1
votes2
answers1998
viewsHow do I set the location of the working directory in Git?
When installing Git, I couldn’t configure the location of my working directory. I’ve already changed it to "Start at:"C: Users Renata Mendes Documents Projects"" in Git Bash properties, but the…
-
1
votes1
answer1228
viewsOriginal site does not accept CSS that on localhost is working
Use the GIT for the versioning of the project under development. I have a form made with the Contact Form 7 and to change his pattern, I changed some classes with css. In the local version it…
-
1
votes1
answer40
viewsResolve apport-GTK, dkpg, and Git related errors
I was using Git on Linux and while removing one branch that I no longer wanted to use, I probably removed other things. Ended up giving error in apport and dkpg. With respect to Git, it just lets…
gitasked 10 years, 2 months ago Fernanda de Camargo 21 -
1
votes1
answer510
viewsMeldmerge (Git, Github) conflict resolution
The tool does not allow me to upload the middle file changes, these are the new changes I need to commit, but it is not going, it is precisely this change that "he wants" to overwrite with one of…