What does the -u flag mean in git push -u origin master?
I was just wondering what does the -u flag mean in this command? git push -u origin master 2 Answers 2
I was just wondering what does the -u flag mean in this command? git push -u origin master 2 Answers 2
I have two branches, master and dev. I always work on dev and only check code into the master branch once it’s been approved for production use. When I do so, I have to do the following: git checkout master git merge dev git checkout dev That’s awfully verbose, and since I do it frequently, … Read more
I recently began using two-factor authentication on GitHub, and I am now unable to use git over https on private repos in the usual way: peter@computer:~$ git clone https://github.com/[…]/MyPrivateRepo Cloning into ‘MyPrivateRepo’… Username for ‘https://github.com’: […] Password for ‘https://[…]@github.com’: remote: Invalid username or password. fatal: Authentication failed for ‘https://github.com/[…]/MyPrivateRepo/’ If I disable two-factor authentication I … Read more
This question already has answers here: How can I view a git log of just one user’s commits? (16 answers) Closed 8 years ago. Our project uses Git as the version control system and recently I needed to review someone’s commits. How can I see a list of commits made by a specific user? 2 … Read more
I staged a lot of files using git add, and now I want to see all the files I have staged, without untracked files or changed, but unstaged files. How do I do that? When using git diff –cached I can see the changes of what I just staged. So then I tried using git … Read more
How can binary files be ignored in git using the .gitignore file? Example: $ g++ hello.c -o hello The “hello” file is a binary file. Can git ignore this file ? 18 Answers 18
Regarding code formatting I’m kind of purist :). I very often remove unnecessary white spaces (lines with only ws, ws at the end of lines etc). I even have set vim to show that kind of lines colored to red. My problem is that using git-diff I often see something like this: – else{ + … Read more
Suppose I have the following commit history on my local-only branch: A — B — C How do I insert a new commit between A and B? 7 Answers 7
What happens to an existing git repository when you issue git init again? I created a repository with git init. Created a file, add, commit. Check the status (nothing to commit). Then created another file, check the status and I can see it’s untracked as expected. Then, say by mistake, I run git init again … Read more
How can you put uncommitted changes to a branch TEST when I am at the branch master? 4 Answers 4