Questions tagged as 'git'

1
answer

Notice Git: LF will be replaced by CRLF

I created a file called tests.html inside a folder. After typing: git add tests.html The message was displayed:    warning: LF will be replaced by CRLF in tests.html   The file will have its original line endings in your working dir...
asked by 17.12.2014 / 20:54
5
answers

How do I undo the last commit in git?

I accidentally committed the wrong files to git. How to undo this?     
asked by 30.01.2014 / 12:17
1
answer

How to undo a "git add" before a commit?

I mistakenly added arquivos using the command git add and I have not yet executed a git commit . Is there a way to undo or remove these commit files?     
asked by 05.05.2015 / 18:07
2
answers

What are the differences between git file states (untracked, unmodified, modified, staged)?

I would like to know what characteristics and differences between the states of the files during their life cycle in git . States : untracked unmodified modified staged     
asked by 30.08.2018 / 12:17
3
answers

How to recover the previous commit?

After adding modified file and having commit , I had to modify the entire structure of the code, but it did not work and I wanted access to the previous code again. How do I retrieve content from the previous commit ?     
asked by 24.12.2014 / 22:20
1
answer

What is the purpose of git push -u?

I have already observed several people asking questions about possible GIT errors and I noticed that sometimes it involves -u . For example Error in Android Studio 2.3 integration with GitLab and Error uploading files to the remote serv...
asked by 06.06.2017 / 17:14
2
answers

What is a "dangling object / commit" in git?

My repository has momentarily corrupted after the yesterday's blackout in Brazil . I was able to fix corruption ( so ) and decided to run a git fsck to check the status of my local repository. Here he responds by saying that there are d...
asked by 22.03.2018 / 17:20
1
answer

How does the merge work?

I created another branch as a backup and I give merge to it, suppose I am in branch daniela3 : git merge origin/develop Only my branch daniela3 will be affected or origin/develop too? I mean, I'll be joining...
asked by 02.03.2015 / 14:55
2
answers

What 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 --bare ?     
asked by 11.08.2015 / 18:43
5
answers

How to know which was the last commit to move in the same file as my commit?

I got to read the question How do I see which commits change a certain file? It's almost what I need in case I want to know if it's possible for me to get the last commit that changed any file I've changed. Is this possible? Or do I have to...
asked by 30.09.2014 / 15:57