Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

while using git , i want to neglect some files at git to track which prevents me making fast pulls, and forces me to stash, how do i avoid this?

Posted on 2015-01-09
3
Medium Priority
?
234 Views
Last Modified: 2015-02-01
Hi,

i am new to version control system git, and source tree... i want to ask 2 issues,

in git bash, command prompt , any time i try to make a pull it asks for username and password , how do i disable this and avoid asking each time for passwords ?

second question is whenever i make changes to my code and pull changes ,it gets an error sayying that there are changes should be removed or stashed etc.. so these are either configuration files or dll files which i dont want to commit and change the contents but it forces me to stash them before i can make a pull. how do i avoid this?

thank you
0
Comment
Question by:nicedone
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 29

Expert Comment

by:fibo
ID: 40540676
Question 1: is the remote you are pulling from registered in the git profile? check with "git config -l"

Not sure if you are using Git from windows or linux.
From windows, you probably have "git gui" in addition to "git bash" (try typing "git gui" from bash)


Question 2: you need to establish some "clean" reference situation so that all dlls, config, etc are either synced or ignored
use the file .gitignore at the root of your project to define which files or directories should be ignored by the tracking system

(To easily ignore files, I personally use TortoiseGit in addition to git bash/ git gui. Be careful though: Do NOT use Tortoise to push, it badly handles conflicts)
0
 

Author Comment

by:nicedone
ID: 40540719
Hi,

For question  1:   Yes it is registered in the git profile when i hit git config -l ,my profile as well as all the repository information has appeared,

i also typed git gui ,i guess this is an interface for git bash ? but i found soucetree way more easy and more functions available on the interface somehow?

For second question : I make a change to a config file, but i dont want to commit this change ,i dont want to push my config change to other developers but on the side i want to run this file on my own desired settings only so in that case ,ignore would work but then it will affect every one , so the file will be ignored in all system which i would not desire?

how can i resolve this ? thanks again
0
 
LVL 29

Accepted Solution

by:
fibo earned 1000 total points
ID: 40543913
question 1: how are you syncing the repositories? thru http: ?
could you place here an edited copy of the output of config -l
(just list the infos for the repository, mail addresse etc, but obfuscate most info)

question 2: before making a pull or a push, you can hide your changes by using "stash"

Another solution would be to "branch" your changes, but this has side effects as well

My 2c on tools:
- I don't know sourcetree, so no comment
- tortoisegit: great to ignore files, and to diff files, with only a right-click. VERY BAD FOR PUSHING since it badly handles conflicts. Do not use Tortoise for pushing changes! Very great to handle any conflicted file (as opposed to a conflicted commit)
- git-gui: great to commit / push files... after their status has been solved with git bash. handling pulls not very evident. The best tool to easily see changes in files
- git bash: great to pull, and to index directories in coherent ways (then commit them with git-gui)
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question